本文整理汇总了Python中Configurables.DecayTreeTuple.Decay方法的典型用法代码示例。如果您正苦于以下问题:Python DecayTreeTuple.Decay方法的具体用法?Python DecayTreeTuple.Decay怎么用?Python DecayTreeTuple.Decay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurables.DecayTreeTuple
的用法示例。
在下文中一共展示了DecayTreeTuple.Decay方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeDecayTreeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
def makeDecayTreeTuple( location, decay, alg_name, tuple_name ):
tuple = DecayTreeTuple( alg_name )
dectype = alg_name[-2:]
#triggerList = list(l0hlt1List)
#if 'KK' == dectype:
# for trigger in hlt2List_KK:
# triggerList.append( trigger + 'Decision')
#elif 'Pi' == dectype:
# for trigger in hlt2List_Pi:
# triggerList.append( trigger + 'Decision')
#elif 'RS' == dectype or 'WS' == dectype:
# for trigger in hlt2List_KPi:
# triggerList.append( trigger + 'Decision')
print alg_name, triggerList
#tuple = DecayTreeTuple('TupleKK')
tuple.ToolList = [ "TupleToolPropertime", "TupleToolKinematic", #"TupleToolPropertime/MyPropertimeTool",
"TupleToolGeometry", "TupleToolEventInfo", "TupleToolPrimaries", "TupleToolTISTOS", #"TupleToolTrigger",
"TupleToolPid", "TupleToolTrackInfo", "TupleToolRecoStats", #"TupleToolGeneration"
]
#tuple.addTool( TupleToolPropertime( name="MyPropertimeTool" ) )
#tuple.MyPropertimeTool.ToolName = "PropertimeFitter/MyPropertimeFitter"
#tuple.MyPropertimeTool.ExtraName = "MassConstraint"
#tuple.MyPropertimeTool.addTool( PropertimeFitter( name = "MyPropertimeFitter" ) )
#tuple.MyPropertimeTool.MyPropertimeFitter.applyBMassConstraint = True
tuple.Inputs = [ location ]#_strippingOutput]
#tuple.InputLocations = [ location ]#_strippingOutput]
tuple.Decay = decay
#tuple.Decay = "[D0 -> ^K- ^pi+]CC"
tuple.TupleName = tuple_name
#tuple.TupleName = "D0KKTuple"
tuple.addTool( TupleToolPropertime() )
tuple.TupleToolPropertime.FitToPV = True
#tuple.addTool( TupleToolTrigger() )
#tuple.TupleToolTrigger.TriggerList = triggerList
#tuple.TupleToolTrigger.VerboseL0 = True
#tuple.TupleToolTrigger.VerboseHlt1 = True
#tuple.TupleToolTrigger.VerboseHlt2 = True
#tuple.TupleToolTrigger.Verbose = True
tuple.addTool( TupleToolTISTOS() )
tuple.TupleToolTISTOS.VerboseL0 = True
tuple.TupleToolTISTOS.VerboseHlt1 = True
tuple.TupleToolTISTOS.VerboseHlt2 = True
tuple.TupleToolTISTOS.Verbose = True
tuple.TupleToolTISTOS.TriggerList = triggerList
return tuple
示例2: EventNodeKiller
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
from Gaudi.Configuration import *
from Configurables import GaudiSequencer
from Configurables import DaVinci
simulation=False
from Configurables import EventNodeKiller
eventNodeKiller = EventNodeKiller('DAQkiller')
eventNodeKiller.Nodes = ['DAQ','pRec']
#MySequencer.Members+=[eventNodeKiller]
from Configurables import DecayTreeTuple
from DecayTreeTuple.Configuration import *
tuple=DecayTreeTuple()
tuple.Decay="[B0 -> ^(K*(892)0 -> ^K+ ^pi-) ^(eta_prime -> ^pi- ^pi+ ^(eta -> ^gamma ^gamma))]CC"
tuple.Branches={"B0":"[B0 -> (K*(892)0 -> K+ pi-) (eta_prime -> pi- pi+ (eta -> gamma gamma))]CC"}
tuple.Inputs=["/Event/Bhadron/Phys/B2XEtaB2etapKstarLine/Particles"]
tuple.ToolList += [
"TupleToolGeometry"
, "TupleToolDira"
, "TupleToolAngles"
, "TupleToolPid"
, "TupleToolKinematic"
, "TupleToolPropertime"
, "TupleToolPrimaries"
, "TupleToolEventInfo"
, "TupleToolTrackInfo"
, "TupleToolVtxIsoln"
, "TupleToolPhotonInfo"
#, "TupleToolMCTruth"
示例3: addTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [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
#.........这里部分代码省略.........
示例4: GaudiSequencer
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
tuple.Jpsi.JpsiTISTOS.Verbose = True
tuple.Jpsi.JpsiTISTOS.TriggerList = list
tuple.Kplus.ToolList += [ "TupleToolTISTOS/KplusTISTOS" ]
tuple.Kplus.addTool( TupleToolTISTOS, name = "KplusTISTOS" )
tuple.Kplus.KplusTISTOS.Verbose = True
tuple.Kplus.KplusTISTOS.TriggerList = list
tuple.muplus.ToolList += [ "TupleToolTISTOS/muplusTISTOS" ]
tuple.muplus.addTool( TupleToolTISTOS, name = "muplusTISTOS" )
tuple.muplus.muplusTISTOS.Verbose = True
tuple.muplus.muplusTISTOS.TriggerList = list
tuple.muminus.ToolList += [ "TupleToolTISTOS/muminusTISTOS" ]
tuple.muminus.addTool( TupleToolTISTOS, name = "muminusTISTOS" )
tuple.muminus.muminusTISTOS.Verbose = True
tuple.muminus.muminusTISTOS.TriggerList = list
tuple.Decay = '[B+ -> ^(J/psi(1S) -> ^mu+ ^mu-) ^K+]CC'
from Configurables import DaVinci
DaVinci().TupleFile = "BuKll.root"
DaVinci().EvtMax = -1
DaVinci().DataType = '2011'
DaVinci().Simulation = False
DaVinci().Lumi = True
#CondDB().UseOracle = True
CondDB( LatestGlobalTagByDataType = '2011' )
_myseq = GaudiSequencer("myseq")
_myseq.Members += [ tuple]
DaVinci().UserAlgorithms = [_myseq]
示例5: execute_option_file
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
def execute_option_file(path):
# ================= BEGIN EDIT AREA =======================
tuplename = "Bu2LLK_meLine"
simulation_inputstring = "/Event/AllStreams/Phys/Bu2LLK_meLine/Particles"
data_inputstring = "/Event/Leptonic/Phys/Bu2LLK_meLine/Particles"
decaydescriptor = "[B+ -> ^[J/psi(1S) -> ^mu+ ^e-]CC ^K+]CC"
branches = { # Dictionary for the branches to write in the tuple
"B" : "[B+ -> [J/psi(1S) -> mu+ e-]CC K+]CC",
"Psi" : "[B+ -> ^[J/psi(1S) -> mu+ e-]CC K+]CC",
"muplus" : "[B+ -> [J/psi(1S) -> ^mu+ e-]CC K+]CC",
"eminus" : "[B+ -> [J/psi(1S) -> mu+ ^e-]CC K+]CC",
"Kplus" : "[B+ -> [J/psi(1S) -> mu+ mu-]CC ^K+]CC"
}
toollist = [ "TupleToolBremInfo" #Bremsstrahlung information
#, "TupleToolGeometry" #geometry of vertex locations (ENDVERTEX, OWNPV, IP_OWNPV, FD_OWNPV, DIRA_OWNPV)
, "TupleToolKinematic" #kinematic variables (inv. mass MM, kin. mass M/sqrt(E^2-p^2), P, PX/Y/Z/E, PT)
#, "TupleToolEventInfo" #Event information such as run number, polarity, GPS time etc.
#, "TupleToolPropertime" #proper lifetime of reconstructed particles
#, "TupleToolAngles" #decay angles of charged tracks
#, "TupleToolTrigger"
#, "TupleToolTrackInfo" #GhostProb of track and track type (TYPE) - 0 = unknown, 1 = velo track...
#, "TupleToolPrimaries" #Number and coordinates of all primary vertices
#, "TupleToolDira"
#, "TupleToolTrackPosition" #Plot the X/Y position at a given Z (default: 2500 = TTstation)
#, "TupleToolRecoStats"
#, "TupleToolIsolationTwoBody" #degree of isolation of two particles with common mother from Bsmumu
#, "TupleToolANNPID" #V2,V3,... ProbNN variables
#, "TupleToolCaloHypo"
#, "TupleToolL0Calo"
]
# ================= END EDIT AREA =======================
# ================= BEGIN DO NOT EDIT HERE =======================
from Configurables import GaudiSequencer
MySequencer = GaudiSequencer('Sequence')
#Check whether it is a DST or MDST file
import os.path
extension = os.path.splitext(path)[1]
print extension
if extension.lower() == ".dst":
DaVinci().InputType = 'DST'
elif extension.lower() == ".mdst":
DaVinci().InputType = 'MDST'
else:
raise Exception("Extension {extension} of {path} does not match .mdst or .dst".format(extension, path))
#Kill some nodes if micro dst-file
if DaVinci().InputType == 'MDST':
from Configurables import EventNodeKiller
eventNodeKiller = EventNodeKiller('DAQkiller')
eventNodeKiller.Nodes = ['/Event/DAQ','/Event/pRec']
MySequencer.Members+=[eventNodeKiller]
#DecayTreeTuple -> Fills information about particles, vertices and daughters
ntuple = DecayTreeTuple(tuplename)
if DaVinci().Simulation is True: # for MC
ntuple.Inputs = [simulation_inputstring]
elif DaVinci().Simulation is False: # for Tuple
ntuple.Inputs = [data_inputstring]
else:
raise Exception(" `DaVinci().Simulation` not set.")
ntuple.Decay = decaydescriptor
ntuple.addBranches(branches)
ntuple.TupleName = "DecayTree"
#Tools added to the ToolList can not be modified i.e. no other options than the defaults can be used
ntuple.ToolList = toollist
MySequencer.Members.append(ntuple)
# ================= END DO NOT EDIT HERE =======================
if DaVinci().Simulation is True:
from Configurables import BackgroundCategory
backgroundinfo = ntuple.addTupleTool("TupleToolMCBackgroundInfo") #Fills the background category
backgroundinfo.addTool(BackgroundCategory('BackgroundCategory'))
#.........这里部分代码省略.........
示例6:
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
"TupleToolMCTruth",
"TupleToolRICHPid",
"TupleToolKinematic",
"TupleToolPrimaries",
"TupleToolEventInfo",
"TupleToolTrackInfo",
"TupleToolAngles",
"TupleToolPropertime",
"TupleToolVtxIsoln",
"TupleToolMCBackgroundInfo"
]
decay="[B+ -> ^(eta_prime -> ^(rho(770)0 -> ^pi+ ^pi-) ^gamma ) ^K+]CC"
tuple.Decay =decay
#DecayTreeFitter Tool
tuple.Branches = { 'B' : "^("+decay.replace("^","")+")" }
from Configurables import TupleToolDecay
tuple.addTool(TupleToolDecay, name = 'B')
tuple.B.ToolList+=["TupleToolTISTOS"]
tuple.B.addTool( TupleToolTISTOS , name="TupleToolTISTOS")
tuple.B.TupleToolTISTOS.VerboseHlt1 = True
tuple.B.TupleToolTISTOS.VerboseHlt2 = True
tuple.B.TupleToolTISTOS.VerboseL0 = True
tuple.B.TupleToolTISTOS.TriggerList = myTriggerList
from Configurables import TupleToolDecayTreeFitter
示例7: LoKi__Hybrid__TupleTool
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
LoKi_psi.Variables = {
"q_PV_constr_B_constr" : "DTF_FUN ( M , True , 'B+' )" ,
"q_PV_constr" : "DTF_FUN ( M , True )" ,
"q_B_constr" : "DTF_FUN ( M , False , 'B+' )" ,
"q_no_constr" : "DTF_FUN ( M , False )" ,
}
LoKi_Mu = LoKi__Hybrid__TupleTool("LoKi_Mu")
LoKi_Mu.Variables = {
"NSHAREDMU" : "NSHAREDMU"
}
tuple_B2Kmumu = DecayTreeTuple("Tuple_B2Kmumu")
tuple_B2Kmumu.Inputs = [ location ]
tuple_B2Kmumu.ToolList = tupletools[:]
tuple_B2Kmumu.Decay = '[B+ -> ^(J/psi(1S) -> ^mu+ ^mu-) ^K+]CC'
tuple_B2Kmumu.Branches = {
"B" : "[B+ -> (J/psi(1S) -> mu+ mu-) K+]CC",
"Kplus" : "[B+ -> (J/psi(1S) -> mu+ mu-) ^K+]CC",
"psi" : "[B+ -> ^(J/psi(1S) -> mu+ mu-) K+]CC",
"muplus" : "[B+ -> (J/psi(1S) -> ^mu+ mu-) K+]CC",
"muminus": "[B+ -> (J/psi(1S) -> mu+ ^mu-) K+]CC",
}
for particle in ["B", "Kplus", "psi", "muplus", "muminus"]:
tuple_B2Kmumu.addTool(TupleToolDecay, name = particle)
# List of the reconstructed tuples
tuples = [ tuple_B2Kmumu
]
for tup in tuples:
示例8: out
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
tuple.addTupleTool("LoKi::Hybrid::EvtTupleTool/LoKi_Evt")
tuple.LoKi_Evt.VOID_Variables = {
"nTracks": "CONTAINS('/Event/Charm/Rec/Track/Best')",
"nPVs": "CONTAINS('/Event/Charm/Rec/Vertex/Primary')",
}
# Other variables
tuple.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_All")
tuple.LoKi_All.Variables = {"Eta": "ETA", "Phi": "PHI"}
# Tell DecayTreeTuple the structure of your decay, you must put ^ in front
# of particles that you want to write out (apart from head). J/psi->mu+mu-
# is a CP eigenstate so we don't need []CC here.
tuple.Decay = "[J/psi(1S) -> ^(KS0 -> ^pi+ ^pi-) ^(KS0 -> ^pi+ ^pi-)]CC"
tuple.Branches = {
"JPsi": "[J/psi(1S) -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)]CC",
"Ks1": "[J/psi(1S) -> ^(KS0 -> pi+ pi-) (KS0 -> pi+ pi-)CC",
"Ks2": "[J/psi(1S) -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-)]CC",
"pi1": "[J/psi(1S) -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-)]CC",
"pi2": "[J/psi(1S) -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-)]CC",
"pi3": "[J/psi(1S) -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-)]CC",
"pi4": "[J/psi(1S) -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-)]CC",
}
tuple.addBranches(tuple.Branches)
tuple.JPsi.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_JPsi")
tuple.JPsi.LoKi_JPsi.Variables = {
示例9: makeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
def makeTuple(self):
"""
Make tuple
"""
from Configurables import FitDecayTrees, DecayTreeTuple, TupleToolDecayTreeFitter, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolPropertime, PropertimeFitter, TupleToolKinematic, TupleToolGeometry, TupleToolEventInfo, TupleToolPrimaries, TupleToolPid, TupleToolTrackInfo, TupleToolRecoStats, TupleToolMCTruth, LoKi__Hybrid__TupleTool, LoKi__Hybrid__EvtTupleTool
tuple = DecayTreeTuple('Tuple'+self.name) # I can put as an argument a name if I use more than a DecayTreeTuple
tuple.Inputs = [ self.sequence.outputLocation() ]
tuple.Decay = self.dec
tuple.ToolList = ['TupleToolKinematic',
'TupleToolEventInfo',
'TupleToolTrackInfo',
'TupleToolPid',
'TupleToolGeometry',
'TupleToolAngles', # Helicity angle
# 'TupleToolPropertime', #proper time TAU of reco particles
]
tuple.InputPrimaryVertices = '/Event/Charm/Rec/Vertex/Primary'
# Other event infos
tuple.addTupleTool('LoKi::Hybrid::EvtTupleTool/LoKi_Evt')
tuple.LoKi_Evt.VOID_Variables = {
#"nSPDHits" : " CONTAINS('Raw/Spd/Digits') " ,
'nTracks' : " CONTAINS ('Charm/Rec/Track/Best') " ,
}
# # Other variables
# tuple.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_All')
# tuple.LoKi_All.Variables = {
# 'BPVIPCHI2' : 'BPVIPCHI2()',
# 'BPVDIRA' : 'BPVDIRA',
# 'BPVLTFITCHI2' : 'BPVLTFITCHI2()',
# }
tuple.addBranches(self.branches)
tuple.phi.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_phi")
tuple.phi.LoKi_phi.Variables = {
'DOCAMAX' : 'DOCAMAX',
"MassDiff_Phi" : "DMASS('phi(1020)')",
"BPVDIRA" : "BPVDIRA",
"IPS_Phi" : "MIPCHI2DV(PRIMARY)",
"VFASPF_CHI2DOF" : "VFASPF(VCHI2/VDOF)",
"VFASPF_CHI2" : "VFASPF(VCHI2)",
"BPVIPCHI2" : "BPVIPCHI2()",
"ADOCA" : "DOCA(1,2)",
"ADOCACHI2" : "DOCACHI2(1,2)",
"DTF_CHI2_PV" : "DTF_CHI2( True, 'phi(1020)' )",
"DTF_NDOF_PV" : "DTF_NDOF( True, 'phi(1020)' )",
"DTF_M_PV" : "DTF_FUN ( M, True, 'phi(1020)' )",
"DTF_M_Ks1_PV" : "DTF_FUN ( CHILD(M,1), True, 'phi(1020)' )",
"DTF_M_Ks2_PV" : "DTF_FUN ( CHILD(M,2), True, 'phi(1020)' )",
# "DTF_CTAU_Ks1" : "DTF_CTAU(1, False, 'phi(1020)' )",
# "DTF_CTAU_Ks2" : "DTF_CTAU(2, False, 'phi(1020)' )",
}
def mySharedConf_Ks(branch):
atool=branch.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_Ks')
atool.Variables = {
"BPVDIRA" : "BPVDIRA",
"VFASPF_CHI2DOF" : "VFASPF(VCHI2/VDOF)",
"VFASPF_CHI2" : "VFASPF(VCHI2)",
"BPVIPCHI2" : "BPVIPCHI2()",
"BPVVD" : "BPVVD",
"BPVVDCHI2" : "BPVVDCHI2",
"ADOCA" : "DOCA(1,2)",
"ADOCACHI2" : "DOCACHI2(1,2)",
'BPVLTIME' : 'BPVLTIME()',
}
PropertimeTool = branch.addTupleTool("TupleToolPropertime/Propertime_Ks")
mySharedConf_Ks(tuple.Ks1)
mySharedConf_Ks(tuple.Ks2)
def mySharedConf_pi(branch):
atool=branch.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_pi')
atool.Variables = {
'TRCHI2DOF' : 'TRCHI2DOF',
'TRGHOSTPROB' : 'TRGHOSTPROB',
}
mySharedConf_pi(tuple.pi1)
mySharedConf_pi(tuple.pi2)
mySharedConf_pi(tuple.pi3)
mySharedConf_pi(tuple.pi4)
# Triggers:
tuple.phi.addTupleTool('TupleToolTISTOS/TISTOS')
#.........这里部分代码省略.........
示例10:
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
'Hlt2TopoMu3BodyBBDTDecision',
'Hlt2TopoMu4BodyBBDTDecision',
'Hlt2TransparentDecision',
'Hlt2DiMuonUnbiasedJPsiDecision'
]
tuple.addTool(TupleToolGeometry)
tuple.TupleToolGeometry.Verbose = True
#tuple.TupleToolTISTOS.UseAutomaticTriggerList = True
tuple.addTool(TupleToolTagging)
tuple.TupleToolTagging.Verbose = True
#from FlavourTagging.Tunings import TuneTool
#TuneTool(tuple,'Xmass_2011')
###########################################################################################################################
tuple.Decay = '[Lambda_b0 -> (^J/psi(1S) -> ^mu+ ^mu-) (^Lambda(1520)0 -> ^p+ ^K-)]cc'
tuple.Branches = {
"Bs" : "[Lambda_b0]cc : [Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (Lambda(1520)0 -> p+ K-) ]cc",
"R" : "[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (^Lambda(1520)0 -> p+ K-)]cc",
"H1" : "[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (Lambda(1520)0 -> ^p+ K-) ]cc",
"H2" : "[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (Lambda(1520)0 -> p+ ^K-)]cc",
"J_psi_1S" : "[Lambda_b0 -> (^J/psi(1S) -> mu+ mu-) (Lambda(1520)0 -> p+ K-)]cc"
}
tuple.ToolList += [
"TupleToolMCTruth",
"TupleToolMCBackgroundInfo"
]
示例11: DaVinci
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
AcceptBadEvents = False,
BadEventSelection = filterBadEvents)
DaVinci().appendToMainSequence([event_node_killer,sc.sequence()])
##################Creating NTuples#####################################
from Configurables import DecayTreeTuple
from Configurables import TupleToolL0Calo
from DecayTreeTuple.Configuration import *
line = 'B2XEtaLb2pKetapLine'
tuple=DecayTreeTuple()
tuple.Decay="[Lambda_b0 -> ^p+ ^K- ^(eta_prime -> ^pi- ^pi+ ^gamma)]CC"
tuple.Branches={"Lambda_b0":"[Lambda_b0 -> p+ K- (eta_prime -> pi- pi+ gamma)]CC"}
tuple.Inputs=['/Event/Phys/{0}/Particles'.format(line)]
tuple.addTool(TupleToolL0Calo())
tuple.TupleToolL0Calo.TriggerClusterLocation="/Event/Trig/L0/Calo"
tuple.TupleToolL0Calo.WhichCalo="HCAL"
tuple.ToolList += [
"TupleToolGeometry"
, "TupleToolDira"
, "TupleToolAngles"
# , "TupleToolL0Calo"
, "TupleToolPid"
, "TupleToolKinematic"
, "TupleToolPropertime"
示例12: CHILD
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
"PE_proton_constr2" : "DTF_FUN ( CHILD( E, 2) , True , strings(['J/psi(1S)', 'chi_c2(1P)']) )",
"PX_kaon_constr2" : "DTF_FUN ( CHILD(PX, 3) , True , strings(['J/psi(1S)', 'chi_c2(1P)']) )",
"PY_kaon_constr2" : "DTF_FUN ( CHILD(PY, 3) , True , strings(['J/psi(1S)', 'chi_c2(1P)']) )",
"PZ_kaon_constr2" : "DTF_FUN ( CHILD(PZ, 3) , True , strings(['J/psi(1S)', 'chi_c2(1P)']) )",
"PE_kaon_constr2" : "DTF_FUN ( CHILD( E, 3) , True , strings(['J/psi(1S)', 'chi_c2(1P)']) )",
}
LoKi_Mu = LoKi__Hybrid__TupleTool("LoKi_Mu")
LoKi_Mu.Variables = {
"NSHAREDMU" : "NSHAREDMU"
}
tuple_B2Kmumu = DecayTreeTuple("Tuple")
tuple_B2Kmumu.Inputs = [ location ]
tuple_B2Kmumu.ToolList = tupletools[:]
tuple_B2Kmumu.Decay = '[Lambda_b0 -> ^(chi_c1(1P) -> ^(J/psi(1S) -> ^mu+ ^mu-) ^gamma) ^p+ ^K-]CC'
tuple_B2Kmumu.Branches = {
"Lambda_b0" : "[Lambda_b0 -> (chi_c1(1P) -> (J/psi(1S) -> mu+ mu-) gamma) p+ K-]CC",
"chi_c" : "[Lambda_b0 -> ^(chi_c1(1P) -> (J/psi(1S) -> mu+ mu-) gamma) p+ K-]CC",
"Jpsi" : "[Lambda_b0 -> (chi_c1(1P) -> ^(J/psi(1S) -> mu+ mu-) gamma) p+ K-]CC",
"gamma" : "[Lambda_b0 -> (chi_c1(1P) -> (J/psi(1S) -> mu+ mu-) ^gamma) p+ K-]CC",
"muplus" : "[Lambda_b0 -> (chi_c1(1P) -> (J/psi(1S) -> ^mu+ mu-) gamma) p+ K-]CC",
"muminus" : "[Lambda_b0 -> (chi_c1(1P) -> (J/psi(1S) -> mu+ ^mu-) gamma) p+ K-]CC",
"proton" : "[Lambda_b0 -> (chi_c1(1P) -> (J/psi(1S) -> mu+ mu-) gamma) ^p+ K-]CC",
"kaon" : "[Lambda_b0 -> (chi_c1(1P) -> (J/psi(1S) -> mu+ mu-) gamma) p+ ^K-]CC",
}
for particle in ["Lambda_b0", "chi_c", "Jpsi", "gamma", "muplus", "muminus", "proton", "kaon"]:
tuple_B2Kmumu.addTool(TupleToolDecay, name = particle)
# List of the reconstructed tuples
tuples = [ tuple_B2Kmumu
示例13:
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
, "Hlt2Topo4BodyBBDTDecision"
, "Hlt2TopoMu4BodyBBDTDecision"
, "Hlt2IncPhiSidebandsDecision"
, "Hlt2B2HHDecision"
]
# Get trigger info
tuple.addTool(TupleToolTrigger, name="TupleToolTrigger")
tuple.TupleToolTrigger.Verbose = True
tuple.TupleToolTrigger.TriggerList = tlist
# Get TISTOS info
tuple.addTool(TupleToolTISTOS, name="TupleToolTISTOS")
tuple.TupleToolTISTOS.Verbose = True
tuple.TupleToolTISTOS.TriggerList = tlist
# Decay descriptor
tuple.Decay = "[B_s0 -> ^(phi(1020) -> ^K+ ^K-) ^(f_0(980) -> ^K+ ^K-)]CC"
#tuple.Decay = "[B0 -> ^(phi(1020) -> ^K+ ^K-) ^(rho(770)0 -> ^pi+ ^pi-)]CC" # original
# Rename f_0(980) branch to KK
tuple.addBranches({
"KK" : " [B_s0 -> (phi(1020) -> K+ K-) ^(f_0(980) -> K+ K-)]CC "
})
# LOKI Vairables
from Configurables import LoKi__Hybrid__TupleTool
LoKiVariables2 = LoKi__Hybrid__TupleTool('LoKiVariables2')
LoKiVariables2.Variables = {
"LOKI_Mass" : "DTF_FUN(M, True)",
"LOKI_Chi2" : "DTF_CHI2(True)",
"LOKI_ndof" : "DTF_NDOF(True)",
"LOKI_MassError2" : "DTF_FUN(M2ERR2, True)",
"LOKI_DTF_CTAU" : "DTF_CTAU( 0, True )",
"LOKI_DTF_CTAUS" : "DTF_CTAUSIGNIFICANCE( 0, True )",
示例14: DataOnDemand
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
DataOnDemand(Location=selBSelectionSequence.outputLocation())])
selABSelectionSequence = SelectionSequence('FakeBs', TopSelection = selectionAB)
from Configurables import FitDecayTrees
fitD2KKP = FitDecayTrees (
"fitD2KKP" ,
Code = "DECTREE('B_s0 -> (D_s+ -> K+ K- pi+) (D_s- -> K- K+ pi-)')",
MassConstraints = [ 'D_s+', 'D_s-' ],
)
fitD2KKP.Inputs = [selABSelectionSequence.outputLocation()]
from Configurables import P2MCPFromProtoP, BackgroundCategory
fakebstuple = DecayTreeTuple("out")
fakebstuple.Decay = "'[B_s0 -> ^D_s- ^D_s+]CC'"
fakebstuple.Inputs = ['Phys/fitD2KKP']
#fakebstuple.addTupleTool("TupleToolPropertime")
#bkgcat = fakebstuple.addTupleTool("TupleToolMCBackgroundInfo")
#bkgcat.IBackgroundCategoryTypes = ['BackgroundCategory/MyBC']
#bkgcat.addTool(BackgroundCategory, name='MyBC')
#bkgcat.MyBC.addTool(P2MCPFromProtoP, name='P2MCPFromProtoP')
#bkgcat.MyBC.P2MCPFromProtoP.Locations = ['MergedEvent/Relations/MergedEvent/Rec/ProtoP/Charged', 'Relations/Rec/ProtoP/Charged']
#bkgcat.MyBC.P2MCPFromProtoP.MCParticleDefaultLocation = 'MergedEvent/MC/Particles'
#fakebstuple.OutputLevel = 2
from Configurables import MCMatchObjP2MCRelator
merge = MergeEvent()
merge.addTool(MCMatchObjP2MCRelator, name='MyRelator')
merge.MyRelator.RelTableLocations = ['/Event/NewEvent/Relations/NewEvent/Rec/ProtoP/Charged']
#merge.OutputLevel = 1
示例15:
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Decay [as 别名]
'Hlt2TopoMu3BodyBBDTDecision',
'Hlt2TopoMu4BodyBBDTDecision',
'Hlt2TransparentDecision',
'Hlt2DiMuonUnbiasedJPsiDecision'
]
tuple.addTool(TupleToolGeometry)
tuple.TupleToolGeometry.Verbose = True
#tuple.TupleToolTISTOS.UseAutomaticTriggerList = True
#tuple.addTool(TupleToolTagging)
#tuple.TupleToolTagging.Verbose = True
#from FlavourTagging.Tunings import TuneTool
#TuneTool(tuple,'Xmass_2011')
###########################################################################################################################
tuple.Decay = '[Lambda_b0 -> ^(J/psi(1S) -> ^mu+ ^mu-) ^(Lambda0 -> ^p+ ^pi-)]CC'
tuple.Branches = {
"Bs" : "^[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (Lambda0 -> p+ pi-)]CC",
"R" : "[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) ^(Lambda0 -> p+ pi-)]CC",
"H1" : "[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (Lambda0 -> ^p+ pi-)]CC",
"H2" : "[Lambda_b0 -> (J/psi(1S) -> mu+ mu-) (Lambda0 -> p+ ^pi-)]CC",
"J_psi_1S" : "[Lambda_b0 -> ^(J/psi(1S) -> mu+ mu-) (Lambda0 -> p+ pi-)]CC"
}
tuple.ToolList += [
"TupleToolMCTruth",
"TupleToolMCBackgroundInfo"
]
from Configurables import TupleToolMCTruth, MCTupleToolP2VV