From fe9852cb6c75d961430ea468af58316761432650 Mon Sep 17 00:00:00 2001
From: Ziyi Wang <wangziyi181@mails.ucas.ac.cn>
Date: Sat, 8 Jul 2023 16:55:32 +0800
Subject: [PATCH 1/2] add two b2oc lines

---
 .../StrippingB2OC/Beauty2Charm_B2DXBuilder.py | 12 +++++++++---
 .../StrippingB2OC/Beauty2Charm_HHBuilder.py   | 19 +++++++++++++++++++
 .../StrippingB2OC/Beauty2Charm_Lb2XBuilder.py | 11 +++++++++++
 .../StrippingB2OC/StrippingBeauty2Charm.py    |  7 +++++--
 4 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
index 618daf1c5..4a801f153 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
@@ -25,7 +25,7 @@ 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,
+                 topoKaons_PID, topoPions_PID, topoProtons_PID, muons, ks, pi0, hh, hhh,
                  config):
         self.config = config
         self.topoPions = [topoPions]
@@ -33,6 +33,7 @@ class B2DXBuilder(object):
         self.topoKaons = [topoKaons]
         self.topoKaons_PID = [topoKaons_PID]
         self.topoPions_PID = [topoPions_PID]
+        self.topoProtons_PID = [topoProtons_PID]
         self.muons = muons
         self.d = d
         self.dst = dst
@@ -110,6 +111,9 @@ class B2DXBuilder(object):
         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)
+
+        self._makeB2DHH('D2HHHPP', self.d.ds_hhh_pid_tight) #ziyi
+
         # B -> D(KSH[H]) X (LL & DD)
         self._makeB02DH('D2KSHLL',
                         self.d.ksh_ll)  # B0  -> D+-(KSLLH) H-+ (+WS)
@@ -472,12 +476,14 @@ class B2DXBuilder(object):
         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)"]
+            'B2DKK': ["B+ -> D+ phi(1020)", "B- -> D- phi(1020)"],
+            'B2DPP': ["B- -> D- p+ p~-", "B+ -> D+ p~- p+"]
         }
         inputs = {
             'B2DPiPi': d2x + self.hh.pipi_pid,
             'B2DKPi': d2x + self.hh.kpi_pid,
-            'B2DKK': d2x + self.hh.kk_pid
+            'B2DKK': d2x + self.hh.kk_pid,
+            'B2DPP': d2x + self.topoProtons_PID
         }
         b2dhh = makeB2XSels(decays, dname, inputs, self.config)
         decays = {'B2DHHOS': ["B- -> D+ rho(770)-", "B+ -> D- rho(770)+"]}
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_HHBuilder.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_HHBuilder.py
index 1be993e8c..b93e76aa8 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_HHBuilder.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_HHBuilder.py
@@ -58,6 +58,7 @@ class HHBuilder(object):
         self.kspi = self._makeKsPi()
         self.kpi0 = self._makeKPi0()
         self.pipi0 = self._makePiPi0()
+        self.ppi0 = self._makePPi0()
         self.kpi = self._makeKPi(self.pipi)
         self.kpi_loose = self._makeKPi_Loose(self.pipi_loose)
         self.kk = self._makeKK(self.pipi)
@@ -67,6 +68,7 @@ class HHBuilder(object):
         self.phi = self._makePhi(self.kk)
         self.rho0 = self._makeRho0(self.pipi)
         self.rhopm = self._makeRhoPM(self.pipi0)
+        self.sigmapm = self._makeSigmaPM(self.ppi0)
         self.kstarpm = self._makeKstarPM(self.kpi0)
         self.ppbar = self._makePPbar()
         # WS selections (ie doubly-charged ones)
@@ -282,6 +284,18 @@ class HHBuilder(object):
             MergedSelection('X2PiPi0Beauty2Charm', RequiredSelections=[m, r])
         ]
 
+    def _makePPi0(self):
+        '''Makes  X -> p+ pi0'''
+        m = self._makeXPLUS2HH('X2PPi0Merged', ['[Sigma+ -> p+ pi0]cc'],
+                               'AM < 5*GeV', self.config,
+                               [self.protons] + self.pi0["Merged"], True)
+        r = self._makeXPLUS2HH('X2PPi0Resolved', ['[Sigma+ -> p+ pi0]cc'],
+                               'AM < 5*GeV', self.config,
+                               [self.protons] + self.pi0["Resolved"], True)
+        return [
+            MergedSelection('X2PPi0Beauty2Charm', RequiredSelections=[m, r])
+        ]
+
     def _makeRho0(self, pipi):
         mass = self._massWindow('RHO', 'rho(770)0').replace(
             'ADAMASS', 'ADMASS')
@@ -301,6 +315,11 @@ class HHBuilder(object):
             'ADAMASS', 'ADMASS')
         return [filterSelection('RHOPM', mass, pipi)]
 
+    def _makeSigmaPM(self, ppi0):
+        mass = self._massWindow('SIGMA', 'Sigma+').replace(
+            'ADAMASS', 'ADMASS')
+        return [filterSelection('SIGMAPM', mass, ppi0)]
+
     def _makeKstarPM(self, kpi):
         mass = self._massWindow('KST', 'K*(892)+').replace('ADAMASS', 'ADMASS')
         return [filterSelection('K*PM', mass, kpi)]
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
index e13427945..9be95907f 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_Lb2XBuilder.py
@@ -949,6 +949,9 @@ class Lb2XBuilder(object):
         # B0 -> Lc+ Sigmacpp(LcPi) K+
         self._makeB02LcSigmacppK()
 
+        # Bs -> Lc- Sigma+
+        self._makeBs2LcSigma()
+
         # B+ -> Lc+ Xic- pi+
         self._makeB2LcXicPi()
 
@@ -2136,6 +2139,14 @@ class Lb2XBuilder(object):
         rs = makeB2XSels(decays, 'Sigmacpp2LcPiLc2PKPi', inputs, self.config)
         self.lines.append(ProtoLine(rs, 1.0))
 
+    def _makeBs2LcSigma(self):
+        '''Make Bs0 -> Lambda_c~- Sigma+'''
+        sigma = self.hh.sigmapm
+        decays = {'Bs2LcSigmap': ["[B_s0 -> Lambda_c~- Sigma+]cc"]}
+        inputs = {'Bs2LcSigmap': self.lc + sigma}
+        rs = makeB2XSels(decays, 'Lc2PKPiSigmap2PPiz', inputs, self.config)
+        self.lines.append(ProtoLine(rs, 1.0))
+
     def _makeLb2DDpK(self):
         '''Make Lb -> D+ D- p K- + cc.'''
         protons = self.protons_pid
diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py
index dea06de96..c79a0a343 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/StrippingBeauty2Charm.py
@@ -296,7 +296,8 @@ default_config = {
             'MASS_WINDOW': {
                 'KST': '150*MeV',
                 'RHO': '150*MeV',
-                'PHI': '150*MeV'
+                'PHI': '150*MeV',
+                'SIGMA': '150*MeV'
             },
             'DAUGHTERS': {
                 'PT_MIN': '100*MeV',
@@ -945,6 +946,7 @@ default_config = {
             'StrippingB02DKsKLLWSD2HHHCFPIDBeauty2CharmLine',
             'StrippingB02DKsKDDWSD2HHHCFPIDBeauty2CharmLine',
             'StrippingB2DKKD2HHHCFPIDBeauty2CharmLine',
+            'StrippingB2DPPD2HHHPPBeauty2CharmLine',
             'StrippingB2DKPiD2HHHCFPIDBeauty2CharmLine',
             'StrippingB2DPiPiD2HHHCFPIDBeauty2CharmLine',
             'StrippingB2DHHOSD2HHHCFPIDBeauty2CharmLine',
@@ -1510,6 +1512,7 @@ default_config = {
             'StrippingLb2sigmacppD0KPiSigmacpp2LcPiLc2PKPiBeauty2CharmLine',
             'StrippingB02LcSigmacppKSigmacpp2LcPiLc2PKPiBeauty2CharmLine',
             'StrippingB2LcXicPiXic2PKPiLc2PKPiBeauty2CharmLine',
+            'StrippingBs2LcSigmapLc2PKPiSigmap2PPizBeauty2CharmLine',
             'StrippingB02DKLTUBD2HHHBeauty2CharmLine',
             'StrippingB02DsKPiPiLTUBD2HHHBeauty2CharmLine',
             'StrippingB02DsstarKLTUBDsstar2DGammaD2HHHBeauty2CharmLine',
@@ -1822,7 +1825,7 @@ class Beauty2CharmConf(LineBuilder):
 
         # make B->DX
         b2dx = B2DXBuilder(d, dst, topoPions, topoPionsLoose, topoKaons,
-                           topoKaons_PID, topoPions_PID, muons, ks, pi0_fromB,
+                           topoKaons_PID, topoPions_PID, topoProtons_PID, muons, ks, pi0_fromB,
                            hh, hhh, config['B2X'])
         self._makeLines(b2dx.lines, config)
 
-- 
GitLab


From 742a55ef5e579a3e02651bd07bf018cbdad9ebe2 Mon Sep 17 00:00:00 2001
From: Ziyi Wang <ziyi.wang@cern.ch>
Date: Sat, 8 Jul 2023 11:09:25 +0200
Subject: [PATCH 2/2] remove marker

---
 .../StrippingB2OC/Beauty2Charm_B2DXBuilder.py                   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
index 4a801f153..095429650 100644
--- a/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
+++ b/Phys/StrippingSelections/python/StrippingSelections/StrippingB2OC/Beauty2Charm_B2DXBuilder.py
@@ -112,7 +112,7 @@ class B2DXBuilder(object):
         self._makeB2DKS('D2HHH', self.d.hhh, 'LL')  # B+-  -> D+-(HHH)  KS
         self._makeB02DV('D2HHHCFPID', self.d.hhh_cf_pid)
 
-        self._makeB2DHH('D2HHHPP', self.d.ds_hhh_pid_tight) #ziyi
+        self._makeB2DHH('D2HHHPP', self.d.ds_hhh_pid_tight)
 
         # B -> D(KSH[H]) X (LL & DD)
         self._makeB02DH('D2KSHLL',
-- 
GitLab