Beispiel #1
0
    def __InclDimuHighQ2__(self, conf, doWS=False, doCCbar=False):
        '''
        Create a new dimuon for high q2 inclusive B->Xmumu
        '''
        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
        CombineDiMuon = CombineParticles()
        CombineDiMuon.DecayDescriptors = ["B0 -> mu- mu+"]
        sel_name = "InclDiMuHighQ2"
        CombineDiMuon.MotherCut = self.InclDiMuHighQ2Cut
        # choose
        if doCCbar == True:
            # make sure cant run WS combinations if running ccbar
            sel_name += "Jpsi"
            CombineDiMuon.CombinationCut = "AM > 0 *MeV"
            CombineDiMuon.MotherCut = self.InclDiMuCCbarCut
        if doWS == True:
            CombineDiMuon.DecayDescriptors = [
                "B0 -> mu- mu+", "B0 -> mu- mu-", "B0 -> mu+ mu+"
            ]

        from PhysSelPython.Wrappers import Selection
        SelDiMuon = Selection("Sel_" + self.name + "_" + sel_name,
                              Algorithm=CombineDiMuon,
                              RequiredSelections=[self.HighQ2Muons])
        return SelDiMuon
Beispiel #2
0
    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, StdAllVeryLooseMuons
        Muons = StdAllLooseMuons if IsMuonFlag else StdAllVeryLooseMuons

        from PhysSelPython.Wrappers import Selection
        SelDiMuon = Selection("Sel_" + self.name + "_DiMuon",
                              Algorithm=CombineDiMuon,
                              RequiredSelections=[Muons])
        return SelDiMuon
Beispiel #3
0
    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+'&'+_daugPtSumCut+'&'+_daugMedPtCut+'&'+_massCutLow+'&'+_massCutHigh+'&'+_daugMaxPtIPCut+'&'+_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+'&'+_vtxChi2Cut+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_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
Beispiel #4
0
    def makeB2JpsiKSDDhh(self, name, config):
        """
            Create and store a B -> Jpsi KS(DD) h h, or a B -> Jpsi KS(DD) h+(-) h+(-) Same Sign Selection Object.
            Arguments:
            name                    : name of the Selection.
            config                  : config dictionary

            Combination Cuts:
            - Bs_Mlow               : lower mass limit - cut on lower mass side band
            - Bs_Mhigh              : upper mass limit - cut on upper mass side band
            - BsDaug_DD_maxDocaChi2 : chi2 between all possible pairs of particles is less than cut

            Mother Cuts:
            - Bs_VtxChi2            : applies chi2 per ndof cut to the vertex of the Bs
            - Bs_Dira               : minimum cosine of the angle between the momentum of the particle and the direction of flight from the best PV to the decay vertex.
            - Bs_PT                 : minimum value of transverse momentum.
            - Bs_DD_IPChi2PV        : significance of the B IP with respect to the best PV.
            """
        # Define Combination cuts, LoKi array functors as applited to array of daughters (begin with A)
        _massCutLow = "(AM>(5336-%s)*MeV)" % config['Bs_Mlow']
        _massCutHigh = "(AM<(5336+%s)*MeV)" % config['Bs_Mhigh']
        _maxDocaChi2Cut = "(ACUTDOCACHI2(%s,''))" % config[
            'BsDaug_DD_maxDocaChi2']

        _combCuts = _massCutLow + "&" + _massCutHigh + "&" + _maxDocaChi2Cut

        # Define Mother cuts
        _vtxChi2Cut = "(VFASPF(VCHI2PDOF)<%s)" % config['Bs_VtxChi2']
        _diraCut = "(BPVDIRA>%s)" % config['Bs_Dira']
        _ptCut = "(PT>%s*MeV)" % config['Bs_PT']
        _ipChi2PV = "(BPVIPCHI2()<%s)" % config['Bs_DD_IPChi2PV']

        _motherCuts = _vtxChi2Cut + '&' + _diraCut + '&' + _ptCut + '&' + _ipChi2PV

        _B = CombineParticles()
        #_B.DaughtersCuts = { "K+" : "(TRCHI2DOF<%s)"% config['Trk_Chi2'], "K+" : " (MIPCHI2DV(PRIMARY)> %s)"% config['Daug_Chi2AFPV'], "pi+" : "(TRCHI2DOF<%s)"% config['Trk_Chi2'], "pi+" : " (MIPCHI2DV(PRIMARY)> %s)"% config['Daug_Chi2AFPV']}
        _B.CombinationCut = _combCuts
        _B.MotherCut = _motherCuts

        if "SameSign" in name:
            _B.DecayDescriptors = [
                "B_s0 -> J/psi(1S) KS0 pi+ pi+",
                "B_s0 -> J/psi(1S) KS0 pi- pi-"
            ]
            self.selB2JpsiKSDDhh_SameSign = Selection(
                name,
                Algorithm=_B,
                RequiredSelections=[self.selJpsi, self.selKS2DD, self.hadrons])

        else:
            _B.DecayDescriptors = ["B_s0 -> J/psi(1S) KS0 pi+ pi-"]
            self.selB2JpsiKSDDhh = Selection(
                name,
                Algorithm=_B,
                RequiredSelections=[self.selJpsi, self.selKS2DD, self.hadrons])
Beispiel #5
0
    def makeB2KSLDhh(self, name, config):
        """
        Create and store either a B -> KS(LD) h+ h- Selection object, or a B -> KS(LD) h+(-) h+(-) Same Sign 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

        _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_LD_maxDocaChi2']
        _daugPtSumCut = "((APT1+APT2+APT3)>%s*MeV)" % config['BDaug_LD_PTsum']

        _combCuts = _daugPtSumCut + '&' + _massCutLow + '&' + _massCutHigh + '&' + _maxDocaChi2Cut + '&' + _aptCut + '&' + _daugMedPtCut + '&' + _daugMaxPtIPCut

        _diraCut = "(BPVDIRA>%s)" % config['B_LD_Dira']
        _KSdiffZ = "((CHILD(VFASPF(VZ),3) - VFASPF(VZ)) > %s*mm)" % config[
            'KS_FD_Z']

        _motherCuts = _diraCut + '&' + _KSdiffZ

        _B = CombineParticles()
        _B.DaughtersCuts = {"pi+": _daughtersCuts}
        _B.CombinationCut = _combCuts
        _B.MotherCut = _motherCuts

        if "SameSign" in name:
            _B.DecayDescriptors = ["B0 -> pi+ pi+ KS0", "B0 -> pi- pi- KS0"]

            self.selB2KSLDhh_SameSign = Selection(
                name,
                Algorithm=_B,
                RequiredSelections=[self.selKS2LD, self.pions])

        else:
            _B.DecayDescriptors = ["B0 -> pi+ pi- KS0"]

            self.selB2KSLDhh = Selection(
                name,
                Algorithm=_B,
                RequiredSelections=[self.selKS2LD, self.pions])
    def __Bs__(self, Dimuon, Kaons, Pions, Kshort, Lambda, Phi, Rho, Kstar,
               Kstar2KsPi, Kstar2KPi0, conf):
        """
        Make and return a Bs selection
        """

        _b2xmumu = CombineParticles()
        _b2xmumu.DecayDescriptors = [
            "B0 -> J/psi(1S) phi(1020)", "[B0 -> J/psi(1S) K*(892)0]cc",
            "B0 -> J/psi(1S) rho(770)0", "B0 -> J/psi(1S) KS0",
            "[B+ -> J/psi(1S) K+]cc", "[B+ -> J/psi(1S) pi+]cc",
            "[B+ -> J/psi(1S) K*(892)+]cc",
            "[Lambda_b0 -> J/psi(1S) Lambda0]cc"
        ]

        _b2xmumu.CombinationCut = "(AM > 4900.0 *MeV) & (AM < 7000.0 *MeV)"
        _b2xmumu.MotherCut = self.__BsCuts__(conf)

        _sel_Daughters = MergedSelection(
            "Selection_" + self.name + "_daughters",
            RequiredSelections=[
                Kaons, Pions, Kshort, Lambda, Phi, Rho, Kstar, Kstar2KsPi,
                Kstar2KPi0
            ])
        sel = Selection("Selection_" + self.name + "_bs2xmumu",
                        Algorithm=_b2xmumu,
                        RequiredSelections=[Dimuon, _sel_Daughters])
        return sel
Beispiel #7
0
    def makeB2KSLLhh( self, name, config ) :
        """
        Create and store a B -> KS(LL) h+ 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']
	_daugMedPtCut   = "(ANUM(PT>%s*MeV)>=2)"             % config['BDaug_MedPT_PT']
	_daugMaxPtIPCut = "(AVAL_MAX(MIPDV(PRIMARY),PT)>%s)" % config['BDaug_MaxPT_IP']
	_hhDocaCut      = "(ADOCA(1,2)<%s)"                  % config['hh_DOCA']
	_daugPtSumCut   = "((APT1+APT2+APT3)>%s*MeV)"        % config['BDaug_LL_PTsum']

	_combCuts = _massCutLow+'&'+_massCutHigh+'&'+_daugMedPtCut+'&'+_daugMaxPtIPCut+'&'+_hhDocaCut+'&'+_daugPtSumCut

	_vtxChi2Cut = "(VFASPF(VCHI2)<%s)"             % config['B_VtxChi2']
	_diraCut    = "(BPVDIRA>%s)"                   % config['B_Dira']
	_ipCut      = "(MIPDV(PRIMARY)<%s)"            % config['B_IPwrtPV']
	_fdCut      = "(VFASPF(VMINVDDV(PRIMARY))>%s)" % config['B_FDwrtPV']
	_fdChi2Cut  = "(BPVVDCHI2>%s)"                 % config['B_LL_FDChi2']

	_motherCuts = _vtxChi2Cut+'&'+_diraCut+'&'+_ipCut+'&'+_fdCut+'&'+_fdChi2Cut

	_B = CombineParticles()
	_B.DecayDescriptors = [ "B0 -> pi+ pi- KS0", \
	                        "B0 -> K+ pi- KS0", "B0 -> pi+ K- KS0", \
				"B0 -> K+ K- KS0" ]
	_B.DaughtersCuts = { "K+" : "TRCHI2DOF<%s"% config['Trk_Chi2'], "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] }
	_B.CombinationCut = _combCuts
	_B.MotherCut = _motherCuts

        self.selB2KSLLhh = Selection (name, Algorithm = _B, RequiredSelections = [ self.selKS2LL, self.pions, self.kaons ])
Beispiel #8
0
    def __Bs__(self, Dimuon, Protons, Kaons, Pions, Pi0, Kshort, Lambda, Phi, Rho, Dplus, Kstar, K1, Lambdastar, Kstar2KsPi, Kstar2KPi0, conf):
        """
        Make and return a Bs selection
        """      

        _b2xmumu = CombineParticles()
        _b2xmumu.DecayDescriptors = [ "B0 -> J/psi(1S) phi(1020)",
                                      "[B0 -> J/psi(1S) K*(892)0]cc",
                                      "B0 -> J/psi(1S) rho(770)0",
                                      "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) K_1(1270)+]cc",
        # removed K1 for timing reasons
        
        _b2xmumu.CombinationCut = self.BdCombCut 
        _b2xmumu.MotherCut = self.BdCut
        
        _sel_Daughters = MergedSelection("Selection_"+self.name+"_daughters",
                                         RequiredSelections = [ Kaons, Pions, Kshort, Lambda, 
                                                               Rho, Phi, Lambdastar, Kstar,
                                                               self.Dzero, Dplus, self.Dstar,
                                                               Kstar2KsPi, Kstar2KPi0, Pi0])
        sel = Selection( "Selection_"+self.name+"_bs2xmumu",
                         Algorithm = _b2xmumu,
                         RequiredSelections = [ Dimuon, _sel_Daughters ])
        return sel
    def makeBs2KSLLKSLL(self, name, config):
        """
        Create and store a B -> KS(LL) KS(LL) Selection object.
        Arguments:
        name             : name of the Selection.
        config           : config dictionary
        """
        # before B vertex fit
        _BamassCut = "(ADAMASS('B_s0')<%s*MeV)" % config['B_MassWindowP']
        _Bdoca = "ACUTDOCA(%s*mm,'')" % config['B_DOCA']
        _combCuts = _BamassCut + '&' + _Bdoca

        _ipChi2Cut = "(MIPCHI2DV(PRIMARY)<%s)" % config['B_IPCHI2']
        _Bip = "(MIPDV(PRIMARY)<%s)" % config['B_IP']
        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)" % config['B_VtxChi2']
        _fdChi2Cut = "(BPVVDCHI2>%s)" % config['B_BPVVDCHI2']

        _motherCuts = _ipChi2Cut + '&' + _Bip + '&' + _vtxChi2Cut + '&' + _fdChi2Cut

        _B = CombineParticles()
        _B.DecayDescriptors = ["B_s0 -> KS0 KS0"]

        _B.CombinationCut = _combCuts
        _B.MotherCut = _motherCuts

        print 'B combCuts: ', _combCuts
        print 'B motherCuts: ', _motherCuts

        self.selBs2KSLLKSLL = Selection(name,
                                        Algorithm=_B,
                                        RequiredSelections=[self.selKS2LL])
Beispiel #10
0
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])
Beispiel #11
0
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.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)"

    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])
Beispiel #12
0
 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  ])
Beispiel #13
0
    def makeBu2KSDDh(self, name, config):
        """
        Create and store a B -> 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 = _daugPtSumCut + '&' + _massCutLow + '&' + _massCutHigh + '&' + _daugMaxPtIPCut

        _pCut = "(P>%s*MeV)" % config['B_Pmin']
        _vtxChi2Cut = "(VFASPF(VCHI2)<%s)" % config['B_DD_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 + '&' + _vtxChi2Cut + '&' + _diraCut + '&' + _ipChi2Cut + '&' + _fdCut + '&' + _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

        return Selection(name,
                         Algorithm=_B,
                         RequiredSelections=[self.selKS2DD, self.selH])
Beispiel #14
0
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 makeB2KSDDhh( self, name, config ) :
        """
        Create and store either a B -> KS(DD) h+ h- Selection object, or a B -> KS(DD) h+(-) h+(-) Same Sign 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

        _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+'&'+_daugPtSumCut+'&'+_daugMedPtCut+'&'+_massCutLow+'&'+_massCutHigh+'&'+_daugMaxPtIPCut+'&'+_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+'&'+_vtxChi2Cut+'&'+_diraCut+'&'+_ipChi2Cut+'&'+_fdCut+'&'+_fdChi2Cut+'&'+_ipChi2SumCut

        _B = CombineParticles()
        _B.DaughtersCuts = { "pi+" : _daughtersCuts }
        _B.CombinationCut = _combCuts
        _B.MotherCut = _motherCuts

        if "SameSign" in name:
            _B.DecayDescriptors = [ "B0 -> pi+ pi+ KS0", "B0 -> pi- pi- KS0" ]

            self.selB2KSDDhh_SameSign = Selection (name, Algorithm = _B, RequiredSelections = [ self.selKS2DD, self.pions ])

        else:
            _B.DecayDescriptors = [ "B0 -> pi+ pi- KS0" ]

            self.selB2KSDDhh = Selection (name, Algorithm = _B, RequiredSelections = [ self.selKS2DD, self.pions ])
    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 makepph_incl(name,
           _h_PT,
           _h_P,
           _h_IPCHI2,
           _h_TRCHI2DOF,
           _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_Charge,
           _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)" % locals(),
		      "K+" :  "(PT > %(_h_PT)s*MeV) \
                             & (P > %(_h_P)s*MeV) \
                             & (MIPCHI2DV(PRIMARY) > %(_h_IPCHI2)s) \
                             & (TRCHI2DOF < %(_h_TRCHI2DOF)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) \
		& (abs(CHILD(Q,1) + CHILD(Q,2) + CHILD(Q,3))== %(_3h_Charge)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,StdTightProtons])
Beispiel #18
0
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.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)"

    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
                     ])
Beispiel #19
0
    def __InclDimuLowQ2__(self, conf, doWS=False):
        '''
        Create a new dimuon for high q2 inclusive B->Xmumu
        '''
        from GaudiConfUtils.ConfigurableGenerators import CombineParticles
        CombineDiMuon = CombineParticles()
        CombineDiMuon.DecayDescriptors = ["B0 -> mu- mu+"]
        sel_name = "InclDiMuLowQ2"
        #CombineDiMuon.CombinationCut = self.InclDiMuLowQ2CombCut
        CombineDiMuon.MotherCut = self.InclDiMuCut + "&" + self.InclDiMuLowQ2Cut
        # choose
        if doWS == True:
            CombineDiMuon.DecayDescriptors = [
                "B0 -> mu- mu+", "B0 -> mu- mu-", "B0 -> mu+ mu+"
            ]

        from PhysSelPython.Wrappers import Selection
        SelDiMuon = Selection("Sel_" + self.name + "_" + sel_name,
                              Algorithm=CombineDiMuon,
                              RequiredSelections=[self.LowQ2Muons])
        return SelDiMuon
Beispiel #20
0
 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 __K1__(self, Kaons, Pions, conf):
        """
        Make a k1
        """      
        _k12kpipi = CombineParticles()
        _k12kpipi.DecayDescriptors = [ "[K_1(1270)+ -> K+ pi- pi+]cc" ]
        _k12kpipi.CombinationCut = self.__K1CombCut__(conf)
        _k12kpipi.MotherCut = self.__K1Cut__(conf)

        _selK12KPIPI = Selection( "Selection_"+self.name+"_K1",
                                     Algorithm = _k12kpipi,
                                     RequiredSelections = [ Kaons, Pions ] )
        return _selK12KPIPI
Beispiel #22
0
def makeKKK_incl(name,
           _h_PT,
           _h_P,
           _h_IPCHI2,
           _h_TRCHI2DOF,
           _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)" % 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 __Rho__(self, Pions, conf):
        """
        Make a rho
        """      
        _rho2pipi = CombineParticles()
        _rho2pipi.DecayDescriptors = [ "rho(770)0 -> pi+ pi-" ]
        # removed same charge modes for timing reasons
        # , "rho(770)0 -> pi+ pi+" , "rho(770)0 -> pi- pi-" ]
        _rho2pipi.MotherCut = self.__KpiCuts__(conf)

        _selRHO2PIPI = Selection( "Selection_"+self.name+"_Rho",
                                     Algorithm = _rho2pipi,
                                     RequiredSelections = [ Pions ] )
        return _selRHO2PIPI
    def __Phi__(self, Kaons, conf):
        """
        Make a phi
        """
        _phi2kk = CombineParticles()
        _phi2kk.DecayDescriptors = [
            "phi(1020) -> K+ K-", "phi(1020) -> K+ K+", "phi(1020) -> K- K-"
        ]
        _phi2kk.MotherCut = self.__KpiCuts__(conf)

        _selPHI2KK = Selection("Selection_" + self.name + "_Phi",
                               Algorithm=_phi2kk,
                               RequiredSelections=[Kaons])
        return _selPHI2KK
    def __Kstar__(self, Kaons, Pions, conf):
        """
        Make a kstar
        """
        _kstar2kpi = CombineParticles()
        _kstar2kpi.DecayDescriptors = [
            "[K*(892)0 -> K+ pi-]cc", "[K*(892)0 -> K+ pi+]cc"
        ]
        _kstar2kpi.MotherCut = self.__KpiCuts__(conf)

        _selKSTAR2KPI = Selection("Selection_" + self.name + "_Kstar",
                                  Algorithm=_kstar2kpi,
                                  RequiredSelections=[Kaons, Pions])
        return _selKSTAR2KPI
Beispiel #26
0
 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 __Lambdastar__(self, Protons, Kaons, conf):
        """
        Make a Lambda* 
        """
        _lambdastar2pk = CombineParticles()
        _lambdastar2pk.DecayDescriptors = [
            "[Lambda(1520)0 -> p+ K-]cc", "[Lambda(1520)0 -> p+ K+]cc"
        ]
        _lambdastar2pk.MotherCut = self.__pKCuts__(conf)

        _selLAMBDASTAR2PK = Selection("Selection_" + self.name + "_Lambdastar",
                                      Algorithm=_lambdastar2pk,
                                      RequiredSelections=[Protons, Kaons])
        return _selLAMBDASTAR2PK
 def __Dimuon__(self, Muons, conf):
     """
     Make and return a Dimuon
     """      
     _dimuon2mumu = CombineParticles()
     _dimuon2mumu.DecayDescriptors = ["J/psi(1S) -> mu+ mu-"]
     # removed same charge modes for timing reasons
     #, " J/psi(1S) -> mu+ mu+", " J/psi(1S) -> mu- mu-"]
     _dimuon2mumu.CombinationCut = "(AM < %(DimuonUPPERMASS)s *MeV)" % conf
     _dimuon2mumu.MotherCut = self.__DimuonCuts__(conf)
     
     _selDIMUON2MUMU = Selection( "Selection_"+self.name+"_Dimuon",
                                 Algorithm = _dimuon2mumu,
                                 RequiredSelections = [ Muons ] )
     return _selDIMUON2MUMU
Beispiel #29
0
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 __Dplus__(self, Kaons, Pions, conf):
        """
        Make a kstar
        """
        _dplus2kkp = CombineParticles()
        _dplus2kkp.DecayDescriptors = [
            "D+ -> K+ K- pi+", "D- -> K- K+ pi-", "D+ -> K+ pi+ pi-",
            "D- -> K- pi- pi+"
        ]
        _dplus2kkp.MotherCut = self.__KpiCuts__(
            conf) + " & " + self.__DplusCuts__(conf)

        _selDPLUS2KKP = Selection("Selection_" + self.name + "_dplus",
                                  Algorithm=_dplus2kkp,
                                  RequiredSelections=[Kaons, Pions])
        return _selDPLUS2KKP
bothstripping = MergedSelection("Selection_mergeddaughters",
       RequiredSelections = [LowQ2MuonsOnDemand,HighQ2MuonsOnDemand])

_filterDimuons = FilterDesktop(Code="ABSID==511") # Dimuons from B0--> mu mu stripping selection
_selDimuons= Selection( "_selDimuons", Algorithm = _filterDimuons, RequiredSelections = [bothstripping] )

from Configurables import SubstitutePID
subalg = SubstitutePID("_B2Jpsi_SubPID", Code="(DECTREE('B0 -> mu+ mu-'))",
                       Substitutions={'B0 -> mu+ mu-' : 'J/psi(1S)'}, MaxChi2PerDoF=-666)
subsel = Selection("subsel",Algorithm = subalg, RequiredSelections = [_selDimuons])

# Try and make B->J/psi K
_B = CombineParticles()
_B.DaughtersCuts = { "K+" : "(PT>500*MeV)&(MIPCHI2DV(PRIMARY) > 9)" }
_B.MotherCut = "(DMASS('B+')<5000*MeV) & (VFASPF(VCHI2)/VFASPF(VDOF)<5.0) & (BPVDIRA > 0.999)" #need to check these cuts
_B.DecayDescriptors = [ "[B+ -> J/psi(1S) K+]cc" ]


_BdecaySelection = Selection( "TurboB", Algorithm = _B, RequiredSelections = [subsel,kaons] )
SeqB = SelectionSequence('SeqB', TopSelection = _BdecaySelection)

# Here we just put the output candidates in an Tuple

tupleB = DecayTreeTuple("bae-muon-data")
tupleB.Inputs = [SeqB.outputLocation()]
tupleB.Decay = "[B+ -> ^K+ ^(J/psi(1S) -> ^mu+ ^mu-)]CC"


tupleB.ToolList =  [
      "TupleToolKinematic"
    , "TupleToolEventInfo"