From 88cbea712646ddb18eed618ea93bb08f53914feb Mon Sep 17 00:00:00 2001
From: Camille Normand <camille.normand@cern.ch>
Date: Wed, 6 Mar 2024 12:40:02 +0100
Subject: [PATCH 1/6] Add B2Dh, D2Kspipi with BELLE2018 model

---
 dkfiles/Bu_D0K,KSpipi=BELLE2018.dec  | 65 ++++++++++++++++++++++++++++
 dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec | 65 ++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+)
 create mode 100644 dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
 create mode 100644 dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec

diff --git a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
new file mode 100644
index 000000000..37d4cd23f
--- /dev/null
+++ b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
@@ -0,0 +1,65 @@
+# EventType: 12165103
+#
+# Descriptor: [B+ -> K+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
+#
+# Documentation: B+ -> K+ D0b with D0b going to KsPiPi following the BELLE2018 model https://arxiv.org/abs/1804.06153, Ks -> pi+pi-
+# EndDocumentation
+#
+# NickName: Bu_D0K,KSpipi=BELLE2018
+#
+# Cuts: LoKi::GenCutTool/TightCut
+#
+# InsertPythonCode:
+# #
+# from Configurables import LoKi__GenCutTool
+# from Gauss.Configuration import *
+# Generation().SignalRepeatedHadronization.addTool ( LoKi__GenCutTool , 'TightCut' )
+# tightCut = Generation().SignalRepeatedHadronization.TightCut
+# tightCut.Decay     = '^[B+ => ^(D~0 => ^(KS0 => ^pi+ ^pi-) ^pi+ ^pi-) ^K+]CC'
+# tightCut.Preambulo += [
+#     'GVZ = LoKi.GenVertices.PositionZ() ' ,
+#     'from GaudiKernel.SystemOfUnits import millimeter',
+#     'inAcc        = (in_range (0.005, GTHETA, 0.400))',
+#     'goodB        = (GP > 25000 * MeV) & (GPT > 1500 * MeV) & (GTIME > 0.05 * millimeter)',
+#     'goodD        = (GP > 10000 * MeV) & (GPT > 500 * MeV)',
+#     'goodKS       = (GP > 4000 * MeV) & (GPT > 250 * MeV)',
+#     'goodDDaugPi  = (GNINTREE (("pi+" == GABSID) & (GP > 1000 * MeV) & inAcc, 1) > 1.5)',
+#     'goodKsDaugPi = (GNINTREE (("pi+" == GABSID) & (GP > 1750 * MeV) & inAcc, 1) > 1.5)',
+#     'goodBachPi   = (GNINTREE (("K+" == GABSID) & (GP > 4000 * MeV) & (GPT > 400 * MeV) & inAcc, 1) > 0.5)'
+# ]
+# tightCut.Cuts      =    {
+#     '[B+]cc'         : 'goodB  & goodBachPi',
+#     '[D0]cc'         : 'goodD  & goodDDaugPi',
+#     '[KS0]cc'        : 'goodKS & goodKsDaugPi',
+#     '[pi+]cc'        : 'inAcc'
+#     }
+# EndInsertPythonCode
+#
+# PhysicsWG: B2OC
+# Tested: Yes
+# Responsible: Camille Normand
+# Email: camille.normand@cern.ch
+# Date: 20240219
+#
+Alias      MyD0      D0
+Alias      Myanti-D0 anti-D0
+Alias      MyKs      K_S0
+ChargeConj MyD0      Myanti-D0
+ChargeConj MyKs      MyKs
+#
+Decay B+sig
+  1.000    Myanti-D0  K+  BTODDALITZCPK 1.22 2.27 0.10;
+Enddecay
+CDecay B-sig
+#
+Decay MyD0
+  1.000    MyKs       pi-         pi+          D0ToKSpipi_2018BE;
+Enddecay
+CDecay Myanti-D0
+#
+Decay MyKs
+  1.000    pi+        pi-         PHSP;
+Enddecay
+#
+End
+#
diff --git a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
new file mode 100644
index 000000000..163ece35b
--- /dev/null
+++ b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
@@ -0,0 +1,65 @@
+# EventType: 12165104
+#
+# Descriptor: [B+ -> pi+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
+#
+# Documentation: B+ -> pi+ D0b with D0b going to KsPiPi following the BELLE2018 model https://arxiv.org/abs/1804.06153, Ks -> pi+pi-
+# EndDocumentation
+#
+# NickName: Bu_D0pi,KSpipi=BELLE2018
+#
+# Cuts: LoKi::GenCutTool/TightCut
+#
+# InsertPythonCode:
+# #
+# from Configurables import LoKi__GenCutTool
+# from Gauss.Configuration import *
+# Generation().SignalRepeatedHadronization.addTool ( LoKi__GenCutTool , 'TightCut' )
+# tightCut = Generation().SignalRepeatedHadronization.TightCut
+# tightCut.Decay     = '^[B+ => ^(D~0 => ^(KS0 => ^pi+ ^pi-) ^pi+ ^pi-) ^pi+]CC'
+# tightCut.Preambulo += [
+#     'GVZ = LoKi.GenVertices.PositionZ() ' ,
+#     'from GaudiKernel.SystemOfUnits import millimeter',
+#     'inAcc        = (in_range (0.005, GTHETA, 0.400))',
+#     'goodB        = (GP > 25000 * MeV) & (GPT > 1500 * MeV) & (GTIME > 0.05 * millimeter)',
+#     'goodD        = (GP > 10000 * MeV) & (GPT > 500 * MeV)',
+#     'goodKS       = (GP > 4000 * MeV) & (GPT > 250 * MeV)',
+#     'goodDDaugPi  = (GNINTREE (("pi+" == GABSID) & (GP > 1000 * MeV) & inAcc, 1) > 1.5)',
+#     'goodKsDaugPi = (GNINTREE (("pi+" == GABSID) & (GP > 1750 * MeV) & inAcc, 1) > 1.5)',
+#     'goodBachPi   = (GNINTREE (("pi+" == GABSID) & (GP > 4000 * MeV) & (GPT > 400 * MeV) & inAcc, 1) > 0.5)'
+# ]
+# tightCut.Cuts      =    {
+#     '[B+]cc'         : 'goodB  & goodBachPi',
+#     '[D0]cc'         : 'goodD  & goodDDaugPi',
+#     '[KS0]cc'        : 'goodKS & goodKsDaugPi',
+#     '[pi+]cc'        : 'inAcc'
+#     }
+# EndInsertPythonCode
+#
+# PhysicsWG: B2OC
+# Tested: Yes
+# Responsible: Camille Normand
+# Email: camille.normand@cern.ch
+# Date: 20240219
+#
+Alias      MyD0      D0
+Alias      Myanti-D0 anti-D0
+Alias      MyKs      K_S0
+ChargeConj MyD0      Myanti-D0
+ChargeConj MyKs      MyKs
+#
+Decay B+sig
+  1.000    Myanti-D0  pi+  BTODDALITZCPK 1.22 -1.206 0.005;
+Enddecay
+CDecay B-sig
+#
+Decay MyD0
+  1.000    MyKs       pi-         pi+          D0ToKSpipi_2018BE;
+Enddecay
+CDecay Myanti-D0
+#
+Decay MyKs
+  1.000    pi+        pi-         PHSP;
+Enddecay
+#
+End
+#
-- 
GitLab


From 72e52658c7c15fb7bf4774a25d37d9f0e12be629 Mon Sep 17 00:00:00 2001
From: Camille Normand <camille.normand@cern.ch>
Date: Fri, 9 Aug 2024 18:08:25 +0200
Subject: [PATCH 2/6] Update model name

---
 dkfiles/Bu_D0K,KSpipi=BELLE2018.dec  | 2 +-
 dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
index 37d4cd23f..41f33ebcd 100644
--- a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
@@ -53,7 +53,7 @@ Enddecay
 CDecay B-sig
 #
 Decay MyD0
-  1.000    MyKs       pi-         pi+          D0ToKSpipi_2018BE;
+  1.000    MyKs       pi-         pi+          D0ToKSpipi;
 Enddecay
 CDecay Myanti-D0
 #
diff --git a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
index 163ece35b..74d6eeacf 100644
--- a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
@@ -1,4 +1,4 @@
-# EventType: 12165104
+# EventType: 12165110
 #
 # Descriptor: [B+ -> pi+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
 #
@@ -53,7 +53,7 @@ Enddecay
 CDecay B-sig
 #
 Decay MyD0
-  1.000    MyKs       pi-         pi+          D0ToKSpipi_2018BE;
+  1.000    MyKs       pi-         pi+          D0ToKSpipi;
 Enddecay
 CDecay Myanti-D0
 #
-- 
GitLab


From d8bcb40769abbdbc91caec0dfbcded98a658c44c Mon Sep 17 00:00:00 2001
From: Camille Normand <camille.normand@cern.ch>
Date: Fri, 9 Aug 2024 18:12:50 +0200
Subject: [PATCH 3/6] Add CPUTime

---
 dkfiles/Bu_D0K,KSpipi=BELLE2018.dec  | 1 +
 dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec | 1 +
 2 files changed, 2 insertions(+)

diff --git a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
index 41f33ebcd..c1c1b8e47 100644
--- a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
@@ -35,6 +35,7 @@
 #     }
 # EndInsertPythonCode
 #
+# CPUTime: < 1 min
 # PhysicsWG: B2OC
 # Tested: Yes
 # Responsible: Camille Normand
diff --git a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
index 74d6eeacf..6d8961820 100644
--- a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
@@ -35,6 +35,7 @@
 #     }
 # EndInsertPythonCode
 #
+# CPUTime: < 1 min
 # PhysicsWG: B2OC
 # Tested: Yes
 # Responsible: Camille Normand
-- 
GitLab


From 24fb04187a8663540bd8a1a3f01f99e1c056bf9b Mon Sep 17 00:00:00 2001
From: Camille Normand <camille.normand@cern.ch>
Date: Tue, 27 Aug 2024 13:48:57 +0200
Subject: [PATCH 4/6] Change EvtTypes

---
 dkfiles/Bu_D0K,KSpipi=BELLE2018.dec  | 2 +-
 dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
index c1c1b8e47..c1644ba60 100644
--- a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
@@ -1,4 +1,4 @@
-# EventType: 12165103
+# EventType: 12165108
 #
 # Descriptor: [B+ -> K+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
 #
diff --git a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
index 6d8961820..d82972f27 100644
--- a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
@@ -1,4 +1,4 @@
-# EventType: 12165110
+# EventType: 12165109
 #
 # Descriptor: [B+ -> pi+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
 #
-- 
GitLab


From 4cc85fe225f219a8d512c2b87dbbbfbbca7af2fb Mon Sep 17 00:00:00 2001
From: Camille Normand <camille.normand@cern.ch>
Date: Tue, 27 Aug 2024 14:54:43 +0200
Subject: [PATCH 5/6] Add TightCut to nickname

---
 ...ipi=BELLE2018.dec => Bu_D0K,KSpipi=TightCut,BELLE2018.dec} | 4 ++--
 ...pi=BELLE2018.dec => Bu_D0pi,KSpipi=TightCut,BELLE2018.dec} | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename dkfiles/{Bu_D0K,KSpipi=BELLE2018.dec => Bu_D0K,KSpipi=TightCut,BELLE2018.dec} (96%)
 rename dkfiles/{Bu_D0pi,KSpipi=BELLE2018.dec => Bu_D0pi,KSpipi=TightCut,BELLE2018.dec} (96%)

diff --git a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec
similarity index 96%
rename from dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
rename to dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec
index c1644ba60..97b7b83bd 100644
--- a/dkfiles/Bu_D0K,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec
@@ -1,11 +1,11 @@
-# EventType: 12165108
+# EventType: 12165163
 #
 # Descriptor: [B+ -> K+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
 #
 # Documentation: B+ -> K+ D0b with D0b going to KsPiPi following the BELLE2018 model https://arxiv.org/abs/1804.06153, Ks -> pi+pi-
 # EndDocumentation
 #
-# NickName: Bu_D0K,KSpipi=BELLE2018
+# NickName: Bu_D0K,KSpipi=TightCut,BELLE2018
 #
 # Cuts: LoKi::GenCutTool/TightCut
 #
diff --git a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec b/dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec
similarity index 96%
rename from dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
rename to dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec
index d82972f27..8a2fbf1d3 100644
--- a/dkfiles/Bu_D0pi,KSpipi=BELLE2018.dec
+++ b/dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec
@@ -1,11 +1,11 @@
-# EventType: 12165109
+# EventType: 12165164
 #
 # Descriptor: [B+ -> pi+ (anti-D0 -> (K_S0 -> pi+ pi-) pi+ pi-)]cc
 #
 # Documentation: B+ -> pi+ D0b with D0b going to KsPiPi following the BELLE2018 model https://arxiv.org/abs/1804.06153, Ks -> pi+pi-
 # EndDocumentation
 #
-# NickName: Bu_D0pi,KSpipi=BELLE2018
+# NickName: Bu_D0pi,KSpipi=TightCut,BELLE2018
 #
 # Cuts: LoKi::GenCutTool/TightCut
 #
-- 
GitLab


From 804e35a0a5239ec9120f48a437c98fa882ed4024 Mon Sep 17 00:00:00 2001
From: Camille Normand <camille.normand@cern.ch>
Date: Wed, 28 Aug 2024 15:43:07 +0200
Subject: [PATCH 6/6] Update model name

---
 dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec  | 2 +-
 dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec b/dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec
index 97b7b83bd..46953b01e 100644
--- a/dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec
+++ b/dkfiles/Bu_D0K,KSpipi=TightCut,BELLE2018.dec
@@ -54,7 +54,7 @@ Enddecay
 CDecay B-sig
 #
 Decay MyD0
-  1.000    MyKs       pi-         pi+          D0ToKSpipi;
+  1.000    MyKs       pi-         pi+          D0TOKSPIPI;
 Enddecay
 CDecay Myanti-D0
 #
diff --git a/dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec b/dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec
index 8a2fbf1d3..e25d788f7 100644
--- a/dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec
+++ b/dkfiles/Bu_D0pi,KSpipi=TightCut,BELLE2018.dec
@@ -54,7 +54,7 @@ Enddecay
 CDecay B-sig
 #
 Decay MyD0
-  1.000    MyKs       pi-         pi+          D0ToKSpipi;
+  1.000    MyKs       pi-         pi+          D0TOKSPIPI;
 Enddecay
 CDecay Myanti-D0
 #
-- 
GitLab