def _bhad2PMuXSS_fakep_Lb(self): from GaudiConfUtils.ConfigurableGenerators import CombineParticles from PhysSelPython.Wrappers import Selection _pMuSS = CombineParticles(DecayDescriptors=self._config["SSDECAYS"], ReFitPVs=True) _pMuSS.Preambulo = self._Definitions() _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config _pMuSS.MotherCut = self._LbMotherSelection() % self._config _pMuSS.ReFitPVs = True _pMuSSSel = Selection( "pMuSS_fakep_Lb_for" + self._name, Algorithm=_pMuSS, RequiredSelections=[self._muonFilter(), self._fakedaughters()]) _LbSSSel = tosSelection( _pMuSSSel, { 'Hlt2.*TopoMu2Body.*Decision%TOS': 0, 'Hlt2.*SingleMuon.*Decision%TOS': 0 }) return _LbSSSel
def makeLb2V0LDh( 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_2bodyMlow'] _massCutHigh = "(AM<(5619+%s)*MeV)" % config['Lb_2bodyMhigh'] _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>%s*MeV)" % config['Lbh_LD_PTMin'] _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+'&'+_fdCut+'&'+_fdChi2Cut _Lb = CombineParticles() _Lb.DecayDescriptors = [ "Lambda_b0 -> pi- Lambda0", "Lambda_b~0 -> pi+ Lambda~0"] _Lb.DaughtersCuts = { "pi+" : "TRCHI2DOF<%s"% config['Trk_Chi2'] } _Lb.CombinationCut = _combCuts _Lb.MotherCut = _motherCuts _Lb.ReFitPVs = True self.selLb2V0LDh = Selection (name, Algorithm = _Lb, RequiredSelections = [self.selLambda2LD, self.pions ]) return self.selLb2V0LDh
def makeD22KPi(name, kaonSel, pionSel, OneKaonPID, DMAXDOCA, DdauMAXIPCHI2, DFDCHI2, DVCHI2DOF, DDIRA, DIPCHI2, DMassWin, DMassLow): """ Makes the D+ -> K- K+ pi+ """ _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\ "(AMAXDOCA('')<%(DMAXDOCA)s) & " \ "(AM > %(DMassLow)s *MeV) &"\ "(AHASCHILD( (ABSID=='K+') & (PIDK-PIDpi > %(OneKaonPID)s) )) &"\ "(AHASCHILD( (MIPCHI2DV(PRIMARY)>%(DdauMAXIPCHI2)s) ) )" %locals() _bcut = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\ "(BPVVDCHI2>%(DFDCHI2)s) & (BPVIPCHI2()< %(DIPCHI2)s) & "\ "(BPVDIRA > %(DDIRA)s)" % locals() _Combine = CombineParticles(DecayDescriptor="[D+ -> K+ K- pi+]cc", CombinationCut=_combcut, MotherCut=_bcut) _Combine.ReFitPVs = True return Selection(name, Algorithm=_Combine, RequiredSelections=[kaonSel, pionSel])
def _Lb2pMuNuVubSS_Lb(self): from GaudiConfUtils.ConfigurableGenerators import CombineParticles from PhysSelPython.Wrappers import Selection _pMuSS = CombineParticles(DecayDescriptors=["[Lambda_b0 -> p+ mu+]cc"], ReFitPVs=True) _pMuSS.Preambulo = self._Definitions() _pMuSS.CombinationCut = "(AM>%(pMuMassLower)s*MeV)" % self._config _pMuSS.MotherCut = "(VFASPF(VCHI2/VDOF)< %(BVCHI2DOF)s) & (BPVDIRA> %(BDIRA)s)"\ "& (Lb_PT > %(pMuPT)s)"\ "& (BPVVDCHI2 >%(BFDCHI2HIGH)s)" % self._config _pMuSS.ReFitPVs = True _pMuSSSel = Selection( "pMuSS_Lb_for" + self._name, Algorithm=_pMuSS, RequiredSelections=[self._muonFilter(), self._protonFilter()]) _pMuSSSel = tosSelection( _pMuSSSel, { 'Hlt2.*TopoMu2Body.*Decision%TOS': 0, 'Hlt2.*SingleMuon.*Decision%TOS': 0 }) return _pMuSSSel
def makeD2PiPiPi(name, pionSel, muonSel,DMAXDOCA, DMassWin, DMassLow, DimuonMass, DVCHI2DOF, DIPCHI2, DDIRA): """ Makes the D+ -> pi+ (pi+ pi-) """ rhos=Selection("pre"+name, Algorithm = CombineParticles(DecayDescriptor = "[rho(770)0 -> pi+ pi-]cc",MotherCut = "ALL"), RequiredSelections=[muonSel] ) _combcut = "(ADAMASS('D+') < %(DMassWin)s *MeV) & "\ "(AMAXDOCA('')<%(DMAXDOCA)s) & " \ "(AM > %(DMassLow)s *MeV) &"\ "(AM23 > %(DimuonMass)s *MeV)" % locals() _bcut = "(VFASPF(VCHI2/VDOF) < %(DVCHI2DOF)s) & "\ "(BPVIPCHI2()< %(DIPCHI2)s) & "\ "(BPVDIRA > %(DDIRA)s)" % locals() _Combine = CombineParticles(DecayDescriptor = "[D+ -> pi+ rho(770)0]cc", CombinationCut = _combcut, MotherCut = _bcut) _Combine.ReFitPVs = True return Selection(name, Algorithm = _Combine, RequiredSelections = [ rhos, pionSel ] )
def makeHb2V0V0V0(self, name, v0v0v0_type, v0v0v0_comb, config): """ Create and store either a B -> V0(LL, DD) V0(LL, DD) V0(LL, DD) Selection object Arguments: name : name of the Selection. config : config dictionary """ if (v0v0v0_comb != 'KSKSLz') | (v0v0v0_comb != 'LzLzLz'): _massCutLow = "(AM>(5279-%s)*MeV)" % config['B_Mlow'] _massCutHigh = "(AM<(5279+%s)*MeV)" % config['B_Mhigh'] else: _massCutLow = "(AM>(5619-%s)*MeV)" % config['Hb_Mlow'] _massCutHigh = "(AM<(5619+%s)*MeV)" % config['Hb_Mhigh'] _aptCut = "(APT>%s*MeV)" % config['B_APTmin'] _combCuts = _massCutLow + '&' + _massCutHigh + '&' + _aptCut _diraCut = "(BPVDIRA>%s)" % config['B_Dira'] _fdChi2Cut = "(BPVVDCHI2>%s)" % config['B_FDChi2'] _ipChi2Cut = "(MIPCHI2DV(PRIMARY)<%s)" % config['B_IPCHI2wrtPV'] _motherCuts = _diraCut + '&' + _fdChi2Cut + '&' + _ipChi2Cut if v0v0v0_comb == 'LLL': _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 3))" elif v0v0v0_comb == 'LLD': _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 3))" elif v0v0v0_comb == 'LDL': _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 3))" elif v0v0v0_comb == 'LDD': _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 3))" elif v0v0v0_comb == 'DDL': _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 3))" else: _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 3))" _B = CombineParticles() _B.CombinationCut = _combCuts _B.MotherCut = _motherCuts _B.ReFitPVs = True _selname = name + '_' + v0v0v0_type + '_' + v0v0v0_comb + '_Sel' if v0v0v0_type == 'KSKSKS' in name: _B.DecayDescriptors = ["B0 -> KS0 KS0 KS0"] if v0v0v0_comb == 'LLL': return Selection(_selname, Algorithm=_B, RequiredSelections=[self.selV0['KS']['LL']]) elif v0v0v0_comb == 'LLD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['KS']['DD'] ]) elif v0v0v0_comb == 'LDD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['KS']['DD'] ]) else: return Selection(_selname, Algorithm=_B, RequiredSelections=[self.selV0['KS']['DD']]) elif v0v0v0_type == 'KSKSLz': _B.DecayDescriptors = ["Lambda_b0 -> KS0 KS0 Lambda0"] if v0v0v0_comb == 'LLL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['Lz']['LL'] ]) elif v0v0v0_comb == 'LLD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['Lz']['DD'] ]) elif v0v0v0_comb == 'LDL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['KS']['DD'], self.selV0['Lz']['LL'] ]) elif v0v0v0_comb == 'LDD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['KS']['DD'], self.selV0['Lz']['DD'] ]) elif v0v0v0_comb == 'DDL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['DD'], self.selV0['Lz']['LL'] ]) else: return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['DD'], self.selV0['Lz']['DD'] ]) elif "LzLzKS" in name: _B.DecayDescriptors = ["B0 -> KS0 Lambda0 Lambda0"] if v0v0v0_comb == 'LLL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['KS']['LL'] ]) elif v0v0v0_comb == 'LLD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['KS']['DD'] ]) elif v0v0v0_comb == 'LDL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'], self.selV0['KS']['LL'] ]) elif v0v0v0_comb == 'LDD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'], self.selV0['KS']['DD'] ]) elif v0v0v0_comb == 'DDL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['DD'], self.selV0['KS']['LL'] ]) else: return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['DD'], self.selV0['KS']['DD'] ]) else: _B.DecayDescriptors = ["Lambda_b0 -> Lambda0 Lambda0 Lambda0"] if v0v0v0_comb == 'LLL': return Selection(_selname, Algorithm=_B, RequiredSelections=[self.selV0['Lz']['LL']]) elif v0v0v0_comb == 'LLD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'] ]) elif v0v0v0_comb == 'LDD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'] ]) else: return Selection(_selname, Algorithm=_B, RequiredSelections=[self.selV0['Lz']['DD']])
def makeHb2V0V0h(self, name, v0v0_type, v0v0_comb, config): """ Create and store either a Hb+ -> V0(LL,DD) V0 (LL,DD) h+ 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 if v0v0_comb != 'KSLz': _massCutLow = "(AM>(5279-%s)*MeV)" % config['B_Mlow'] _massCutHigh = "(AM<(5279+%s)*MeV)" % config['B_Mhigh'] else: _massCutLow = "(AM>(5791-%s)*MeV)" % config['Hb_Mlow'] _massCutHigh = "(AM<(5791+%s)*MeV)" % config['Hb_Mhigh'] _aptCut = "(APT>%s*MeV)" % config['B_APTmin'] _combCuts = _massCutLow + '&' + _massCutHigh + '&' + _aptCut _diraCut = "(BPVDIRA>%s)" % config['B_Dira'] _vtxChi2Cut = "(VFASPF(VCHI2)<%s)" % config['B_VtxChi2'] _fdChi2Cut = "(BPVVDCHI2>%s)" % config['B_FDChi2'] _ipChi2Cut = "(MIPCHI2DV(PRIMARY)<%s)" % config['B_IPCHI2wrtPV'] _motherCuts = _diraCut + '&' + _vtxChi2Cut + '&' + _fdChi2Cut + '&' + _ipChi2Cut if v0v0_comb == 'LL': _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2))" elif v0v0_comb == 'LD': _motherCuts += "& (CHILDCUT(CHILDCUT(ISLONG, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2))" elif v0v0_comb == 'DL': _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISLONG, 2), 2))" else: _motherCuts += "& (CHILDCUT(CHILDCUT(ISDOWN, 2), 1)) & (CHILDCUT(CHILDCUT(ISDOWN, 2), 2))" _B = CombineParticles() _B.DaughtersCuts = {"pi+": _daughtersCuts} _B.CombinationCut = _combCuts _B.MotherCut = _motherCuts _B.ReFitPVs = True _selname = name + '_' + v0v0_type + '_' + v0v0_comb + '_Sel' if v0v0_type == 'KSKS': _B.DecayDescriptors = ["B+ -> KS0 KS0 pi+"] if v0v0_comb == 'LL': return Selection( _selname, Algorithm=_B, RequiredSelections=[self.selV0['KS']['LL'], self.pions]) elif v0v0_comb == 'LD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['KS']['DD'], self.pions ]) else: return Selection( _selname, Algorithm=_B, RequiredSelections=[self.selV0['KS']['DD'], self.pions]) elif v0v0_type == 'KSLz': _B.DecayDescriptors = ["Xi_b- -> KS0 Lambda0 pi-"] if v0v0_comb == 'LL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['Lz']['LL'], self.pions ]) elif v0v0_comb == 'LD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['LL'], self.selV0['Lz']['DD'], self.pions ]) elif v0v0_comb == 'DL': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['DD'], self.selV0['Lz']['LL'], self.pions ]) else: return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['KS']['DD'], self.selV0['Lz']['DD'], self.pions ]) else: _B.DecayDescriptors = ["B+ -> Lambda0 Lambda0 pi+"] if v0v0_comb == 'LL': return Selection( _selname, Algorithm=_B, RequiredSelections=[self.selV0['Lz']['LL'], self.pions]) elif v0v0_comb == 'LD': return Selection(_selname, Algorithm=_B, RequiredSelections=[ self.selV0['Lz']['LL'], self.selV0['Lz']['DD'], self.pions ]) else: return Selection( _selname, Algorithm=_B, RequiredSelections=[self.selV0['Lz']['DD'], self.pions])