def makeB2XSels(decays, xtag, inputs, config, useIP=True, resVert=True): '''Returns a list of the Hb->X selections.''' sels = [] for tag, decay in decays.iteritems(): sname = tag + xtag + 'Beauty2Charm' sel = makeB2X(sname, decay, inputs[tag], config, useIP, resVert) sel = tisTosSelection(sel) sel = filterSelection(sname + 'B2CBBDT', "FILTER('BBDecTreeTool/B2CBBDT')", [sel]) from Configurables import BBDecTreeTool as BBDT bbdt = BBDT(sel.name() + '.B2CBBDT') bbdt.Threshold = config['B2CBBDT_MIN'] bbdt.ParamFile = 'Beauty2Charm_BDTParams_v1r0.txt' bbdt.ParticleDictTool = 'LoKi::Hybrid::DictOfFunctors/VarHandler' from Configurables import LoKi__Hybrid__DictOfFunctors as VarHandler varHandler = VarHandler(bbdt.name() + '.VarHandler') heavyIDs = "( (5 == ((ABSID / 1000) % 10)) " \ + "| (4 == ((ABSID / 1000) % 10))" \ + "| (5 == ((ABSID / 100) % 10))" \ + "| (4 == ((ABSID / 100) % 10)) )" hvChi2DOFTot = "SUMTREE(VFASPF(VCHI2),%s,0.0) / SUMTREE(VFASPF(VDOF),%s,0.0)" % ( heavyIDs, heavyIDs) varHandler.Variables = { "FDCHI2": "BPVVDCHI2", "PT": "PT", "HVCHI2DOFTOT": hvChi2DOFTot } sels.append(sel) return sels
def topoBDT(n, inputs): sel = filterSelection('Topo%dBodyBBDTSel' % n, "FILTER('BBDecTreeTool/TopoBBDT')", [inputs]) from Configurables import BBDecTreeTool as BBDT bbdt = BBDT(sel.name() + '.TopoBBDT') bbdt.Threshold = 0.1 bbdt.ParamFile = 'Hlt2Topo%dBody_BDTParams_v1r0.txt' % n return sel
def makeB2XSels(decays, xtag, inputs, config, useIP=True, resVert=True): '''Returns a list of the Hb->X selections.''' sels = [] for tag, decay in decays.iteritems(): sname = tag + xtag + 'Beauty2Charm' sel = makeB2X(sname, decay, inputs[tag], config, useIP, resVert) sel = tisTosSelection(sel) sel = filterSelection(sname + 'B2CBBDT', "FILTER('BBDecTreeTool/B2CBBDT')", [sel]) from Configurables import BBDecTreeTool as BBDT bbdt = BBDT(sel.name() + '.B2CBBDT') bbdt.Threshold = config['B2CBBDT_MIN'] bbdt.ParamFile = 'Beauty2Charm_BDTParams_v1r0.txt' sels.append(sel) return sels
def topoBDT(self, n, inputs, V0s=True, rad=False): PIDs = ['K+', 'KS0', 'Lambda0', 'Lambda~0'] if rad: sel = self.filterSelection('Topo%dRadBodyBBDTSel' % n, "FILTER('BBDecTreeTool/TopoBBDT')", [inputs]) PIDs.append('gamma') else: sel = self.filterSelection('Topo%dBodyBBDTSel' % n, "FILTER('BBDecTreeTool/TopoBBDT')", [inputs]) from Configurables import BBDecTreeTool as BBDT bbdt = BBDT(sel.name() + '.TopoBBDT') bbdt.Threshold = -1 bbdt.ANNSvcKey = 9999 bbdt.PIDs = PIDs bbdt.ParamFile = 'Hlt2Topo%dBody_BDTParams_v1r0.txt' % n return sel
def topoBDT(n, inputs): sel = filterSelection('Topo%dBodyBBDTSel' % n, "FILTER('BBDecTreeTool/TopoBBDT')", [inputs]) from Configurables import BBDecTreeTool as BBDT bbdt = BBDT(sel.name() + '.TopoBBDT') bbdt.Threshold = 0.1 bbdt.ParamFile = 'Hlt2Topo%dBody_BDTParams_v1r0.txt' % n bbdt.ParticleDictTool = 'LoKi::Hybrid::DictOfFunctors/VarHandler' from Configurables import LoKi__Hybrid__DictOfFunctors as VarHandler varHandler = VarHandler(bbdt.name() + '.VarHandler') varHandler.Variables = { "M": "MM/MeV", "DOCA": "DOCAMAX_('',False)/mm", "CANDIPCHI2": "BPVIPCHI2()", "MCOR": "BPVCORRM", "FDCHI2": "BPVVDCHI2", "PT": "PT", "PTMIN": "MINTREE(ISBASIC,PT)/MeV", "PTSUM": "SUMTREE(PT,ISBASIC,0.0)/MeV" } return sel