本文整理汇总了Python中Configurables.DecayTreeTuple.Branches["B"]方法的典型用法代码示例。如果您正苦于以下问题:Python DecayTreeTuple.Branches["B"]方法的具体用法?Python DecayTreeTuple.Branches["B"]怎么用?Python DecayTreeTuple.Branches["B"]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurables.DecayTreeTuple
的用法示例。
在下文中一共展示了DecayTreeTuple.Branches["B"]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Branches["B"] [as 别名]
def addTuple(name="", decay="", addendum="", head="/Event/Phys/", dtf=True, resonant=True, shortname="", verbose=[] ):
from Configurables import DecayTreeTuple, PrintDecayTree, FilterDesktop, GaudiSequencer, PrintHeader, TESCheck
if shortname == "": shortname = name
shortname = shortname+"_Tuple"+addendum
shortname = shortname.replace("MCMC","MC")
seq = GaudiSequencer("Seq"+shortname)
if ( not "/"==head[-1] ): head = head+'/'
location = head+name+"/Particles"
from Configurables import LoKi__HDRFilter
if ( "/Event/Phys/" == head ):
filter = TESCheck("Check"+shortname,Inputs = [ location ], Stop = False)
else : # I am not running the selection, hence the stripping decision must be here
filter = LoKi__HDRFilter( "Check"+shortname,
Code = "HLT_PASS('Stripping"+name+"Decision')",
Location="/Event/Strip/Phys/DecReports" )
#filter.OutputLevel = 1
seq.Members += [ filter ] # PrintHeader(),
tuple = DecayTreeTuple(shortname)
isMDST = (addendum.upper()=="MDST")
if (isMDST):
RIT = head.replace("/Phys","")
print "RootInTES set to", RIT
tuple.RootInTES = RIT
tuple.Inputs = [ "Phys/"+name+"/Particles" ]
else :
tuple.Inputs = [ location ]
# tuple.OutputLevel = 1
tuple.ToolList = []
tuple.Decay = decay
tg = tuple.addTupleTool("TupleToolGeometry")
if not isMDST: tg.FillMultiPV = True
tlist = []
if ("e+" in decay):
tlist = electronLines()
elif ("mu+" in decay):
tlist = muonLines()
if ( False ):
tlist = allLines()
print tlist
if ( Jpsi2MuMu != decay ): bpsi = (decay.replace("^","")).replace("(J/psi(1S)","^(J/psi(1S)")
else : bpsi = "^("+decay.replace("^","")+")"
print "J/psi branch is `` ", bpsi, "''"
tuple.Branches["Psi"] = bpsi
# sort out kstars
if "892" in decay:
bkstar = (decay.replace("^","")).replace("(K*(892)","^(K*(892)")
tuple.Branches["Kstar"] = bkstar
Kstar = tuple.addTupleTool("TupleToolDecay/Kstar")
from Configurables import TupleToolTISTOS
tistos = TupleToolTISTOS(TriggerList = tlist
, VerboseHlt1 = True, VerboseHlt2 = True, VerboseL0 = True)
Psi = tuple.addTupleTool("TupleToolDecay/Psi")
Psi.addTool(tistos)
Psi.ToolList += [ "TupleToolTISTOS" ]
# if (not isMDST):
# vi = tuple.Psi.addTupleTool("TupleToolVtxIsoln")
# vi.InputParticles = [ "/Event/Phys/MyGoodPions" ]
if ( Jpsi2MuMu == decay ):
if (dtf):
pvfit = tuple.Psi.addTupleTool("TupleToolDecayTreeFitter/PVFit") # fit with all constraints I can think of
pvfit.Verbose = True
pvfit.constrainToOriginVertex = True
else:
B = tuple.addTupleTool("TupleToolDecay/B")
if ( Bs2JpsiPhi==decay ):
p2vv = B.addTupleTool("TupleToolP2VV")
p2vv.Calculator = "Bs2JpsiPhiAngleCalculator"
elif ( "K*(892)0" in decay and not Bd2MuMuKstSS==decay ):
p2vv = B.addTupleTool("TupleToolP2VV")
p2vv.Calculator = "Bd2KstarMuMuAngleCalculator"
if (Lambdab2Jpsippi==decay ): B.addTupleTool("TupleToolDalitz")
if ('Xi_b-' in decay ): bh = 'Xi_b-'
elif ('Xi_b~+' in decay ): bh = 'Xi_b~+'
elif ('Lambda_b0' in decay ): bh = 'Lambda_b0'
elif ('B0' in decay): bh = 'B0'
elif ('B+' in decay ): bh = 'B+'
elif ('B_s0' in decay ): bh = 'B_s0'
if ('CC' in decay): bh = '['+bh+']cc'
print "Branch will be ``", bh+" : "+decay.replace("^",""), "''"
tuple.Branches["B"] = "^("+decay.replace("^","")+")"
# This is needed for ConstB
#.........这里部分代码省略.........