From 757a39d1594f330aa9f12ccbcbba9e6a32b3a069 Mon Sep 17 00:00:00 2001
From: Qile Niu <niuql21@lzu.edu.cn>
Date: Wed, 12 Jul 2023 17:52:12 +0800
Subject: [PATCH 1/3] version.0

---
 StrippingLambdab2PiLambdac2PEta.py | 313 +++++++++++++++++++++++++++++
 1 file changed, 313 insertions(+)
 create mode 100644 StrippingLambdab2PiLambdac2PEta.py

diff --git a/StrippingLambdab2PiLambdac2PEta.py b/StrippingLambdab2PiLambdac2PEta.py
new file mode 100644
index 000000000..5f330f6ff
--- /dev/null
+++ b/StrippingLambdab2PiLambdac2PEta.py
@@ -0,0 +1,313 @@
+###############################################################################
+# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration      #
+#                                                                             #
+# This software is distributed under the terms of the GNU General Public      #
+# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
+#                                                                             #
+# In applying this licence, CERN does 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 two channels are used:
+Lambda_b0-> pi (Lambda_c+ -> p+ eta)
+Lambda_b0-> pi (Lambda_c+ -> p+ eta')
+'''
+
+
+__author__ = ['Xiao-Rui Lyu', 'Qi-Le Niu']
+__date__ = '2023/07/12'
+__version__ = '$Revision: 0.1 $'
+__all__ = ('StrippingLambdac2PEta'
+           ,'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, StdLooseProtons
+from StandardParticles import StdLooseMergedPi0, StdLooseResolvedPi0
+from StandardParticles import StdLooseResolvedEta, StdLooseEta2gg
+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='Lambdac2PEta'
+    #### This is the dictionary of all tunable cuts ########
+default_config={
+      'NAME'        : 'Lambdac2PEta',
+      'WGs'         : ['Charm'],
+      'BUILDERTYPE' : 'StrippingLambdac2PEta',
+      'STREAMS'     : ['Charm'],
+      'CONFIG'      : {
+          'GEC_nLongTrk' : 160    # adimensional
+        , 'signalPrescale'       :   1.0
+        , 'TRCHI2DOFMax'            :   3.0
+        , 'GhostProb'               :   0.3
+        , 'TrGhostProbMax'          :   0.25 # same for all particles
+        , 'MINIPCHI2'               :   3.0  # adimensiional
+        , 'MuonP'                   :   3*GeV
+        , 'MuonPT'                  :   250*MeV
+        , 'MuonIPCHI2'              :   4.0 
+        , 'MuonPIDmu'               :   0.0
+        , 'ProtonP'                 :   3.0*GeV
+        , 'ProtonPT'                :   500*MeV
+        , 'Proton_PIDpPIDpi_Min'    :   5.0
+        , 'Proton_PIDpPIDK_Min'     :   0.0
+        , 'PionP'                   :   3*GeV
+        , 'PionPT'                  :   250*MeV
+        , 'PionPIDK'                :  5.0
+        , 'Pion_PIDpiPIDK_Min'      :   0.0
+        , 'KaonP'                   :   3*GeV
+        , 'KaonPT'                  :   250*MeV
+        , 'KaonPIDK'                :  10.0
+        , 'Kaon_PIDKPIDpi_Min'      :   5.0
+        , 'ProbNNpMin'              :   0.2 #ProbNNp cut for proton in L0, to suppress the bkg of L0 
+        , 'ProbNNp'                 :   0.4
+        , 'ProbNNk'                 :   0.4
+        , 'ProbNNpi'                :   0.4
+        , 'ProbNNpiMax'             :   0.9
+        , 'LambdaLLPMin'            :2000.0*MeV
+        , 'LambdaLLPTMin'           : 500.0*MeV
+        , 'LambdaLLCutMass'         :  50.0*MeV
+        , 'LambdaLLCutFDChi2'       : 100.0 ## unitless
+        , 'LambdaDDPMin'            :2000.0*MeV
+        , 'LambdaDDPTMin'           : 500.0*MeV
+        , 'LambdaDDCutMass'         :  50.0*MeV
+        , 'LambdaDDCutFDChi2'       : 100.0## unitless
+        , 'LambdaVertexChi2'        :   10.0## max chi2/ndf for Lambda0 vertex
+
+        , 'Lc_M_HalfWin'           :   200.0*MeV
+        , 'Lb_M_HalfWin'           :   200.0*MeV
+        , 'Lc_Daug_1of3_MIPCHI2DV_Min': 3.0
+        , 'Lc_ADOCAMAX_Max'         :   0.15*mm
+        , 'Lc_APT_Min'              :   1.2*GeV
+        , 'Lc_AP_Min'               :   15*GeV
+        , 'Lc_VCHI2_Max'            :  30.0
+        , 'Lc_BPVVDCHI2_Min'        :  16.0
+        , 'Lc_BPVVDZ_Min'           :  0.5*mm
+        , 'Lc_BPVDIRA_Min'          :   0.95
+
+        #For Lb
+        , 'Lb_AP_Min': 20*GeV 
+        , 'Lb_APT_Min': 1.5*GeV 
+        , 'Lb_VCHI2_Max': 30 
+        , 'Lb_BPVVDCHI2_Min': 16 
+        , 'Lb_BPVVDZ_Min': 0.7*mm 
+        , 'Lb_BPVDIRA_Min': 0.95 
+      } ## end of 'CONFIG' 
+}  ## end of default_config
+
+#-------------------------------------------------------------------------------------------------------------
+class StrippingLambdac2PEta(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: p+, pi, pi0
+        ##########################################################################
+
+        self.selPi = Selection( "SelPifor" + name,
+                Algorithm = self._piFilter("Pifor"+name),
+                RequiredSelections = [StdLoosePions])
+                                                                                                                                                                                                               
+        #self.Pi0Resolved = Selection( "SelPi0Resolvedfor" + name,
+        #        Algorithm = self._pi0ResolvedFilter("Pi0Resolvedfor"+name),
+        #        RequiredSelections = [StdLooseResolvedPi0])
+
+        #self.Pi0Merged = Selection( "SelPi0Mergedfor" + name,
+        #        Algorithm = self._pi0MergedFilter("Pi0Mergedfor"+name),
+        #        RequiredSelections = [StdLooseMergedPi0])
+
+        self.selProton = Selection( "SelPfor" + name,
+                Algorithm = self._protonFilter("Pfor"+name),
+                RequiredSelections = [StdLooseProtons])
+
+        self.makeEta()
+        # then use self.Eta2PiPiPi0 and self.Eta2PiPiGamma
+
+
+        ##########################################################################
+        self.DmesonSLList = self.makeLine()
+
+
+    #------------------------------------------------------------------------------------------
+    #------------------------------------------------------------------------------------------
+    # Sub Function
+    #------------------------------------------------------------------------------------------
+    #------------------------------------------------------------------------------------------
+    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 _piFilter( self , _name):
+        _code = "  (TRCHI2DOF < %(TRCHI2DOFMax)s)"\
+                "& (P>%(PionP)s) & (PT > %(PionPT)s)"\
+                "& (TRGHOSTPROB< %(TrGhostProbMax)s)"\
+                "& (MIPCHI2DV(PRIMARY)> %(MINIPCHI2)s)"\
+                "& (PIDK< %(PionPIDK)s) "\
+                "& (HASRICH)&(PROBNNpi > %(ProbNNpi)s) " % self.config
+        _pi = FilterDesktop(Code = _code )
+        return _pi
+
+
+    def makeLb0Line(self, line_name, prescale, Lc):
+        # comb_cut = "(ADAMASS('Lambda_b0') < 1.1*%(Lb_M_HalfWin)s)"\
+                   # "& (AP > %(Lb_AP_Min)s)"\
+                   # "& (APT > %(Lb_APT_Min)s)" % self.config
+        # vertex_cut  = "  (ADMASS('Lambda_b0') < %(Lb_M_HalfWin)s)"\
+                      # "& (BPVVDCHI2>%(Lb_BPVVDCHI2_Min)s)" \
+                      # "& (BPVDIRA>%(Lb_BPVDIRA_Min)s)" % self.config
+
+        comb_cut = "in_range(200, AM, 200000)"
+        vertex_cut  = "ALL"
+
+        Lb0 = self.createCombinationSel(OutputList = "Lb02LcPi_" + line_name,
+                DecayDescriptor = "[Lambda_b0 -> Lambda_c+ pi-]cc",
+                DaughterLists   = [Lc, self.selPi],
+                PreVertexCuts   = comb_cut,
+                PostVertexCuts  = vertex_cut )
+        Lb0Line = StrippingLine( line_name, 
+                prescale = prescale,
+                selection = Lb0, 
+                EnableFlavourTagging = False )
+        return Lb0Line
+
+
+    ##------------------------------------------------------------------------------------------
+    ##  -------------------- Begin to DpSL  ------------
+    def makeLine( self ):
+
+        _strCutCombfor = "(AMINCHILD(MIPCHI2DV(PRIMARY))>%(Lc_Daug_1of3_MIPCHI2DV_Min)s)" \
+                    "& (AP>%(Lc_AP_Min)s)" \
+                    "& (ADAMASS('Lambda_c+') < %(Lc_M_HalfWin)s)" \
+                    "& (APT>%(Lc_APT_Min)s)" % self.config
+
+        _strCutMothfor = "(VFASPF(VCHI2) < %(Lc_VCHI2_Max)s)" \
+                      "& (ADMASS('Lambda_c+') < %(Lc_M_HalfWin)s)" \
+                      "& (BPVVDCHI2>%(Lc_BPVVDCHI2_Min)s)" \
+                      "& (BPVDIRA>%(Lc_BPVDIRA_Min)s)" % self.config
+
+        _strCutComb_Mass   = "(ADAMASS('Lambda_c+') < 1.1*%(Lc_M_HalfWin)s)" % self.config
+        _strCutMoth_Mass   = "(ADMASS('Lambda_c+') < %(Lc_M_HalfWin)s)" % self.config
+
+        _strCutComb   = _strCutCombfor + '&' + _strCutComb_Mass
+        _strCutMoth   = _strCutMothfor + '&' + _strCutMoth_Mass
+        
+        ''' Stripping Lambda_c+ -> p+ eta '''
+        PEta2PiPiPi0 = self.createCombinationSel(OutputList = "Lc2PEta2PiPiPi0" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> p+ eta]cc",
+                DaughterLists   = [self.selProton, self.Eta2PiPiPi0],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        self.registerLine(self.makeLb0Line(
+            line_name=self.name + "Lb2LcPiLc2Eta2PiPiPi0",
+            prescale=self.config['signalPrescale'],
+            Lc=PEta2PiPiPi0
+            ))
+
+        ''' Stripping Lambda_c+ -> p+ eta_prime '''
+        PEtap2PiPiPi0 = self.createCombinationSel(OutputList = "Lc2PEtap2PiPiPi0" + self.name,
+                DecayDescriptor = "[Lambda_c+ -> p+ eta_prime]cc",
+                DaughterLists   = [self.selProton, self.Etap2PiPiEta],
+                PreVertexCuts   = _strCutComb,
+                PostVertexCuts  = _strCutMoth )
+        self.registerLine(self.makeLb0Line(
+            line_name=self.name + "Lb2LcPiLc2Etap2PiPiPi0",
+            prescale=self.config['signalPrescale'],
+            Lc=PEtap2PiPiPi0
+            ))
+
+    ##  --------------------  End of DpSL  ------------
+    ##------------------------------------------------------------------------------------------
+    def makeEta(self):
+        #get standard containers
+        self.Pi0List     = DataOnDemand(Location = "Phys/StdLoosePi02gg/Particles")
+        #self.GammaList   = DataOnDemand(Location = "Phys/StdLooseAllPhotons/Particles")
+        self.LoosePionList    = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
+
+        #clean neutrals
+        _tightpi0_cut   = "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05) & (PT>1*GeV)"
+        #_tightgamma_cut = "(CL>0.05) & (PT>500*MeV)"
+
+        #pipi vertex cuts
+        _pipix_cut      = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)"
+
+        #pipix0 cuts
+        _eta_cut        = "(ADAMASS('eta')<100*MeV)       & (APT>1500*MeV)"
+        _etap_cut       = "(ADAMASS('eta_prime')<100*MeV) & (APT>1500*MeV)"
+
+        #filter standard containers
+        self.TightPi0List   = self.createSubSel( OutputList = self.name + '_TightPi0',   InputList  = self.Pi0List,     Cuts = _tightpi0_cut)
+        #self.TightGammaList = self.createSubSel( OutputList = self.name + '_TightGamma', InputList  = self.GammaList,   Cuts = _tightgamma_cut)
+
+        #-------------
+
+        self.Eta2PiPiPi0 = self.createCombinationSel( OutputList      = self.name + "_Eta2PiPiPi0",
+                                                      DecayDescriptor = "eta -> pi+ pi- pi0",
+                                                      DaughterLists   = [ self.LoosePionList, self.TightPi0List],
+                                                      PreVertexCuts   = _eta_cut,
+                                                      PostVertexCuts  = _pipix_cut)
+        #-------------
+        self.Etap2PiPiEta = self.createCombinationSel( OutputList      = self.name + "_Etap2PiPiEta",
+                                                      DecayDescriptor = "eta_prime -> pi+ pi- eta",
+                                                      DaughterLists   = [ self.LoosePionList, self.Eta2PiPiPi0],
+                                                      PreVertexCuts   = _etap_cut,
+                                                      PostVertexCuts  = _pipix_cut)
+
+    ##########################################################################
+    ## 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'''
+        if type(DecayDescriptor) is list:
+            combiner = CombineParticles( DecayDescriptors = DecayDescriptor,
+                    DaughtersCuts = DaughterCuts,
+                    MotherCut = PostVertexCuts,
+                    CombinationCut = PreVertexCuts,
+                    ReFitPVs = True)
+            return Selection ( OutputList,
+                    Algorithm = combiner,
+                    RequiredSelections = DaughterLists)
+        else:
+            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 
-- 
GitLab


From ff75f30bba3b2c52bb46a291899a18be5375b2e1 Mon Sep 17 00:00:00 2001
From: Qile Niu <niuql21@lzu.edu.cn>
Date: Sat, 15 Jul 2023 10:52:56 +0800
Subject: [PATCH 2/3] version.1

---
 StrippingLambdab2PiLambdac2PEta.py | 39 ++++++------------------------
 1 file changed, 7 insertions(+), 32 deletions(-)

diff --git a/StrippingLambdab2PiLambdac2PEta.py b/StrippingLambdab2PiLambdac2PEta.py
index 5f330f6ff..55c0e4e15 100644
--- a/StrippingLambdab2PiLambdac2PEta.py
+++ b/StrippingLambdab2PiLambdac2PEta.py
@@ -25,8 +25,7 @@ __all__ = ('StrippingLambdac2PEta'
 
 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, StdLooseProtons
+from StandardParticles import  StdAllLoosePions, StdAllLooseProtons, StdLooseProtons, StdLoosePions
 from StandardParticles import StdLooseMergedPi0, StdLooseResolvedPi0
 from StandardParticles import StdLooseResolvedEta, StdLooseEta2gg
 from PhysSelPython.Wrappers import Selection, DataOnDemand, MergedSelection
@@ -51,10 +50,6 @@ default_config={
         , 'GhostProb'               :   0.3
         , 'TrGhostProbMax'          :   0.25 # same for all particles
         , 'MINIPCHI2'               :   3.0  # adimensiional
-        , 'MuonP'                   :   3*GeV
-        , 'MuonPT'                  :   250*MeV
-        , 'MuonIPCHI2'              :   4.0 
-        , 'MuonPIDmu'               :   0.0
         , 'ProtonP'                 :   3.0*GeV
         , 'ProtonPT'                :   500*MeV
         , 'Proton_PIDpPIDpi_Min'    :   5.0
@@ -63,24 +58,11 @@ default_config={
         , 'PionPT'                  :   250*MeV
         , 'PionPIDK'                :  5.0
         , 'Pion_PIDpiPIDK_Min'      :   0.0
-        , 'KaonP'                   :   3*GeV
-        , 'KaonPT'                  :   250*MeV
-        , 'KaonPIDK'                :  10.0
-        , 'Kaon_PIDKPIDpi_Min'      :   5.0
         , 'ProbNNpMin'              :   0.2 #ProbNNp cut for proton in L0, to suppress the bkg of L0 
         , 'ProbNNp'                 :   0.4
         , 'ProbNNk'                 :   0.4
         , 'ProbNNpi'                :   0.4
         , 'ProbNNpiMax'             :   0.9
-        , 'LambdaLLPMin'            :2000.0*MeV
-        , 'LambdaLLPTMin'           : 500.0*MeV
-        , 'LambdaLLCutMass'         :  50.0*MeV
-        , 'LambdaLLCutFDChi2'       : 100.0 ## unitless
-        , 'LambdaDDPMin'            :2000.0*MeV
-        , 'LambdaDDPTMin'           : 500.0*MeV
-        , 'LambdaDDCutMass'         :  50.0*MeV
-        , 'LambdaDDCutFDChi2'       : 100.0## unitless
-        , 'LambdaVertexChi2'        :   10.0## max chi2/ndf for Lambda0 vertex
 
         , 'Lc_M_HalfWin'           :   200.0*MeV
         , 'Lb_M_HalfWin'           :   200.0*MeV
@@ -116,20 +98,12 @@ class StrippingLambdac2PEta(LineBuilder) :
                      "Preambulo": ["from LoKiTracks.decorators import *"]}
         
         ##########################################################################
-        ## Basic particles: p+, pi, pi0
+        ## Basic particles: p+, pi
         ##########################################################################
 
         self.selPi = Selection( "SelPifor" + name,
                 Algorithm = self._piFilter("Pifor"+name),
                 RequiredSelections = [StdLoosePions])
-                                                                                                                                                                                                               
-        #self.Pi0Resolved = Selection( "SelPi0Resolvedfor" + name,
-        #        Algorithm = self._pi0ResolvedFilter("Pi0Resolvedfor"+name),
-        #        RequiredSelections = [StdLooseResolvedPi0])
-
-        #self.Pi0Merged = Selection( "SelPi0Mergedfor" + name,
-        #        Algorithm = self._pi0MergedFilter("Pi0Mergedfor"+name),
-        #        RequiredSelections = [StdLooseMergedPi0])
 
         self.selProton = Selection( "SelPfor" + name,
                 Algorithm = self._protonFilter("Pfor"+name),
@@ -227,15 +201,15 @@ class StrippingLambdac2PEta(LineBuilder) :
             ))
 
         ''' Stripping Lambda_c+ -> p+ eta_prime '''
-        PEtap2PiPiPi0 = self.createCombinationSel(OutputList = "Lc2PEtap2PiPiPi0" + self.name,
+        PEtap2PiPiEta = self.createCombinationSel(OutputList = "Lc2PEtap2PiPiEta" + self.name,
                 DecayDescriptor = "[Lambda_c+ -> p+ eta_prime]cc",
                 DaughterLists   = [self.selProton, self.Etap2PiPiEta],
                 PreVertexCuts   = _strCutComb,
                 PostVertexCuts  = _strCutMoth )
         self.registerLine(self.makeLb0Line(
-            line_name=self.name + "Lb2LcPiLc2Etap2PiPiPi0",
+            line_name=self.name + "Lb2LcPiLc2Etap2PiPiEta",
             prescale=self.config['signalPrescale'],
-            Lc=PEtap2PiPiPi0
+            Lc=PEtap2PiPiEta
             ))
 
     ##  --------------------  End of DpSL  ------------
@@ -248,6 +222,7 @@ class StrippingLambdac2PEta(LineBuilder) :
 
         #clean neutrals
         _tightpi0_cut   = "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05) & (PT>1*GeV)"
+        #_tightpi0_cut   = " (PT>1*GeV)"
         #_tightgamma_cut = "(CL>0.05) & (PT>500*MeV)"
 
         #pipi vertex cuts
@@ -255,7 +230,7 @@ class StrippingLambdac2PEta(LineBuilder) :
 
         #pipix0 cuts
         _eta_cut        = "(ADAMASS('eta')<100*MeV)       & (APT>1500*MeV)"
-        _etap_cut       = "(ADAMASS('eta_prime')<100*MeV) & (APT>1500*MeV)"
+        _etap_cut       = "(ADAMASS('eta_prime')<200*MeV) & (APT>1500*MeV)"
 
         #filter standard containers
         self.TightPi0List   = self.createSubSel( OutputList = self.name + '_TightPi0',   InputList  = self.Pi0List,     Cuts = _tightpi0_cut)
-- 
GitLab


From 5f8f960187112f6a7beea90a01301e82c117d3fd Mon Sep 17 00:00:00 2001
From: Qile Niu <niuql21@lzu.edu.cn>
Date: Mon, 17 Jul 2023 13:44:00 +0800
Subject: [PATCH 3/3] version.2

---
 StrippingLambdab2PiLambdac2PEta.py | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/StrippingLambdab2PiLambdac2PEta.py b/StrippingLambdab2PiLambdac2PEta.py
index 55c0e4e15..56113d582 100644
--- a/StrippingLambdab2PiLambdac2PEta.py
+++ b/StrippingLambdab2PiLambdac2PEta.py
@@ -1,5 +1,5 @@
 ###############################################################################
-# (c) Copyright 2000-2019 CERN for the benefit of the LHCb Collaboration      #
+# (c) Copyright 2000-2023 CERN for the benefit of the LHCb Collaboration      #
 #                                                                             #
 # This software is distributed under the terms of the GNU General Public      #
 # Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING".   #
@@ -16,14 +16,13 @@ Lambda_b0-> pi (Lambda_c+ -> p+ eta')
 '''
 
 
-__author__ = ['Xiao-Rui Lyu', 'Qi-Le Niu']
+__author__ = ['Xiao-Rui Lyu', 'Pei-Rong Li', 'Miroslav Saur', 'Qi-Le Niu']
 __date__ = '2023/07/12'
 __version__ = '$Revision: 0.1 $'
 __all__ = ('StrippingLambdac2PEta'
            ,'default_config')
 
 
-from Gaudi.Configuration import *
 from GaudiConfUtils.ConfigurableGenerators import FilterDesktop, CombineParticles
 from StandardParticles import  StdAllLoosePions, StdAllLooseProtons, StdLooseProtons, StdLoosePions
 from StandardParticles import StdLooseMergedPi0, StdLooseResolvedPi0
@@ -47,7 +46,6 @@ default_config={
           'GEC_nLongTrk' : 160    # adimensional
         , 'signalPrescale'       :   1.0
         , 'TRCHI2DOFMax'            :   3.0
-        , 'GhostProb'               :   0.3
         , 'TrGhostProbMax'          :   0.25 # same for all particles
         , 'MINIPCHI2'               :   3.0  # adimensiional
         , 'ProtonP'                 :   3.0*GeV
@@ -56,11 +54,8 @@ default_config={
         , 'Proton_PIDpPIDK_Min'     :   0.0
         , 'PionP'                   :   3*GeV
         , 'PionPT'                  :   250*MeV
-        , 'PionPIDK'                :  5.0
-        , 'Pion_PIDpiPIDK_Min'      :   0.0
-        , 'ProbNNpMin'              :   0.2 #ProbNNp cut for proton in L0, to suppress the bkg of L0 
+        , 'PionPIDK'                :   5.0
         , 'ProbNNp'                 :   0.4
-        , 'ProbNNk'                 :   0.4
         , 'ProbNNpi'                :   0.4
         , 'ProbNNpiMax'             :   0.9
 
@@ -146,13 +141,6 @@ class StrippingLambdac2PEta(LineBuilder) :
 
 
     def makeLb0Line(self, line_name, prescale, Lc):
-        # comb_cut = "(ADAMASS('Lambda_b0') < 1.1*%(Lb_M_HalfWin)s)"\
-                   # "& (AP > %(Lb_AP_Min)s)"\
-                   # "& (APT > %(Lb_APT_Min)s)" % self.config
-        # vertex_cut  = "  (ADMASS('Lambda_b0') < %(Lb_M_HalfWin)s)"\
-                      # "& (BPVVDCHI2>%(Lb_BPVVDCHI2_Min)s)" \
-                      # "& (BPVDIRA>%(Lb_BPVDIRA_Min)s)" % self.config
-
         comb_cut = "in_range(200, AM, 200000)"
         vertex_cut  = "ALL"
 
@@ -217,13 +205,10 @@ class StrippingLambdac2PEta(LineBuilder) :
     def makeEta(self):
         #get standard containers
         self.Pi0List     = DataOnDemand(Location = "Phys/StdLoosePi02gg/Particles")
-        #self.GammaList   = DataOnDemand(Location = "Phys/StdLooseAllPhotons/Particles")
         self.LoosePionList    = DataOnDemand(Location = "Phys/StdLoosePions/Particles")
 
         #clean neutrals
-        _tightpi0_cut   = "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05) & (PT>1*GeV)"
-        #_tightpi0_cut   = " (PT>1*GeV)"
-        #_tightgamma_cut = "(CL>0.05) & (PT>500*MeV)"
+        _tightpi0_cut   = "(CHILD(CL,1)>0.05) & (CHILD(CL,2)>0.05) & (PT>0.0*GeV)"
 
         #pipi vertex cuts
         _pipix_cut      = "(BPVVDZ>0) & (VFASPF(VCHI2)<9) & (BPVDIRA>0.95) & (BPVVDCHI2>25)"
@@ -234,7 +219,6 @@ class StrippingLambdac2PEta(LineBuilder) :
 
         #filter standard containers
         self.TightPi0List   = self.createSubSel( OutputList = self.name + '_TightPi0',   InputList  = self.Pi0List,     Cuts = _tightpi0_cut)
-        #self.TightGammaList = self.createSubSel( OutputList = self.name + '_TightGamma', InputList  = self.GammaList,   Cuts = _tightgamma_cut)
 
         #-------------
 
@@ -285,4 +269,3 @@ class StrippingLambdac2PEta(LineBuilder) :
             return Selection ( OutputList,
                     Algorithm = combiner,
                     RequiredSelections = DaughterLists)
-    #print "DEBUG here is :",__file__,sys._getframe().f_lineno 
-- 
GitLab