Пример #1
0
    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 + " & ((PIDp-PIDpi)>-10)" + " & ((PIDp-PIDK)>-10)",
            "K+":
            self.TrackCuts + " & ((PIDK-PIDpi)>-10)" + " & ((PIDK-PIDp)>-10)",
            "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])
Пример #2
0
 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])
Пример #3
0
    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)
Пример #4
0
def makeB24p(name):

    B24p = DaVinci__N4BodyDecays("Combine" + name)
    B24p.DecayDescriptors = [
        "[B0 -> p+ p+ p~- p~-]cc", "[B0 -> p+ p+ p+ p~-]cc"
    ]
    B24p.DaughtersCuts = {
        "p+": TrackCuts + " & ((PIDp-PIDpi)>0)" + " & ((PIDp-PIDK)>0)"
    }
    B24p.Combination12Cut = p4Combination12Cut
    B24p.Combination123Cut = BCombination123Cut
    B24p.CombinationCut = BCombinationCut
    B24p.MotherCut = BMotherCut

    _myProtons = DataOnDemand(Location="Phys/StdLooseProtons/Particles")

    return Selection(name, Algorithm=B24p, RequiredSelections=[_myProtons])
Пример #5
0
    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])
Пример #6
0
 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)
Пример #7
0
    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)>0)"
        }

        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])
Пример #8
0
    def createCombinationSel(self,
                             OutputList,
                             DecayDescriptor,
                             DaughterLists,
                             DaughterCuts={},
                             Combination12Cut={},
                             Combination123Cut={},
                             PreVertexCuts="AALL",
                             PostVertexCuts="ALL"):

        combiner = DaVinci__N4BodyDecays(DecayDescriptor=DecayDescriptor,
                                         DaughtersCuts=DaughterCuts,
                                         MotherCut=PostVertexCuts,
                                         CombinationCut=PreVertexCuts,
                                         Combination12Cut=Combination12Cut,
                                         Combination123Cut=Combination123Cut)
        return Selection(OutputList,
                         Algorithm=combiner,
                         RequiredSelections=DaughterLists)
Пример #9
0
def makeB2JpsiKpi(name):

    B2JpsiKpi = DaVinci__N4BodyDecays("Combine" + name)
    B2JpsiKpi.DecayDescriptors = ["[B0 -> p+ p~- K+ pi-]cc"]
    B2JpsiKpi.DaughtersCuts = {
        "p+": TrackCuts + " & ((PIDp-PIDpi)>-10)" + " & ((PIDp-PIDK)>-10)",
        "K+": TrackCuts + " & ((PIDK-PIDpi)>-10)" + " & ((PIDK-PIDp)>-10)",
        "pi-": TrackCuts
    }
    B2JpsiKpi.Combination12Cut = JpsiCombination12Cut
    B2JpsiKpi.Combination123Cut = BCombination123Cut
    B2JpsiKpi.CombinationCut = BCombinationCut
    B2JpsiKpi.MotherCut = BMotherCut

    _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])
Пример #10
0
    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)
Пример #11
0
MakeChic2JpsiGamma = CombineParticles("MakeChic2JpsiGamma")
MakeChic2JpsiGamma.DecayDescriptors = ['chi_c1(1P) -> J/psi(1S) gamma']
MakeChic2JpsiGamma.CombinationCut = "( AM - AM1 ) < 700 * MeV"
MakeChic2JpsiGamma.MotherCut = "MM<10000.*MeV"
MakeChic2JpsiGamma.DaughtersCuts = {
    "J/psi(1S)": "M  < ( 3.100 + 0.120 ) * GeV",
    'gamma': "PT > 400 * MeV "
}
SelChic = Selection("SelChic",
                    Algorithm=MakeChic2JpsiGamma,
                    RequiredSelections=[SelJpsi, SelPhotons])

############
SelKaons = AutomaticData(Location='Phys/StdAllLooseKaons/Particles')
MakeBp2Chic1K = DaVinci__N4BodyDecays("MakeBp2Chic1K")
MakeBp2Chic1K.DecayDescriptor = "[B+ -> chi_c1(1P) K+]cc"
MakeBp2Chic1K.Combination12Cut = "( AM < 6 * GeV  ) & ( ACHI2DOCA(1,2) < 20 )"
MakeBp2Chic1K.Combination123Cut = "( AM < 6 * GeV  ) & ( ACHI2DOCA(1,3) < 20 ) & ( ACHI2DOCA(2,3) < 20 )"
MakeBp2Chic1K.CombinationCut = "in_range ( 4.75 * GeV , AM , 5.85 * GeV ) &( ACHI2DOCA(1,4) < 20 ) & (ACHI2DOCA(2,4) < 20 ) & (ACHI2DOCA(3,4) < 20 ) "
MakeBp2Chic1K.MotherCut = "(VFASPF(VCHI2PDOF)<10) & (BPVLTIME()>0.333333*ps)"
MakeBp2Chic1K.DaughtersCuts = {
    "K+":
    " (PT> 200 * MeV ) & ( CLONEDIST> 5000) & (TRGHOSTPROB < 0.5) & (TRCHI2DOF< 4) & in_range (2, ETA,5) & in_range (3.2*GeV, P,150 * GeV ) & HASRICH & (PROBNNk> 0.1) & (MIPCHI2DV()>4)"
}

SelBp = Selection("SelBp",
                  Algorithm=MakeBp2Chic1K,
                  RequiredSelections=[SelChic, SelKaons])
BpVetoPi0 = Pi0Veto__Tagger(
    "BpVetoPi0",