本文整理汇总了Python中Configurables.DecayTreeTuple.Inputs方法的典型用法代码示例。如果您正苦于以下问题:Python DecayTreeTuple.Inputs方法的具体用法?Python DecayTreeTuple.Inputs怎么用?Python DecayTreeTuple.Inputs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurables.DecayTreeTuple
的用法示例。
在下文中一共展示了DecayTreeTuple.Inputs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeDecayTreeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [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: execute_option_file
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
def execute_option_file(path):
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]
#Create DecayTreeTuple -> Fills information about particles, vertices and daughters
data = DecayTreeTuple('Bu2LLK_meLine')
#Set root "folder" for MDST - better don't do this as it most likely causes a crash
#Instead set RootInTES for the particular Tool (e.g. TupleToolTrackHits that needs it)
#if DaVinci().InputType == 'MDST':
# data.RootInTES = "/Event/Leptonic"
if DaVinci().Simulation is True: # for MC
data.Inputs = ["/Event/AllStreams/Phys/Bu2LLK_meLine/Particles"]
elif DaVinci().Simulation is False: # for Tuple
data.Inputs = ["/Event/Leptonic/Phys/Bu2LLK_meLine/Particles"]
else:
raise Exception(" `DaVinci().Simulation` not set.")
data.Decay = "[B+ -> ^[J/psi(1S) -> ^mu+ ^e-]CC ^K+]CC"
data.addBranches({
"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"
})
data.TupleName = "DecayTree"
#TupleTools
#Tools added to the ToolList can not be modified i.e. no other options than the defaults can be used
data.ToolList = [
]
#Settings for TupleToolTrackHits (some only are necessary for MDST-files because of other locations of the clusters)
if(True): #Change this value if you don't want to use this tool
from Configurables import TupleToolTrackHits, STOfflinePosition
trackhits = data.addTupleTool("TupleToolTrackHits")
if DaVinci().InputType == 'MDST':
from Configurables import MeasurementProvider
data.addTool(MeasurementProvider('MeasProvider'))
data.MeasProvider.RootInTES = "/Event/Leptonic/" #Change Leptonic for your stream-name in case of MDST
trackhits.MeasurementProvider = data.MeasProvider
itClusterPosition = STOfflinePosition('ToolSvc.ITClusterPosition') #avoid crashes from missing IT channels
itClusterPosition.DetType = 'IT'
MySequencer.Members.append(data)
################################
### DaVinci configuration ####
################################
DaVinci().UserAlgorithms = [MySequencer]
DaVinci().MoniSequence += [data]
DaVinci().EvtMax = 5000
DaVinci().Lumi = True
DaVinci().SkipEvents = 0
示例3: addTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [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: DecayTreeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
from Gaudi.Configuration import *
from PhysSelPython.Wrappers import Selection, SelectionSequence, DataOnDemand
from Configurables import DecayTreeTuple, FitDecayTrees, TupleToolRecoStats, TupleToolTrigger, TupleToolTISTOS, CondDB
from DecayTreeTuple.Configuration import *
tuple = DecayTreeTuple("Jpsi_Tuple")
tuple.Inputs = ["/Event/Dimuon/Phys/B2XMuMu_Line/Particles"]
tuple.ToolList = [
"TupleToolKinematic"
, "TupleToolEventInfo"
, "TupleToolRecoStats"
, "TupleBuKmmFit"
]
tuple.addBranches ({
"Bplus" : "[B+ -> K+ ( J/psi(1S) -> mu+ mu-)]CC",
"Kplus" : "[B+ -> ^K+ ( J/psi(1S) -> mu+ mu-)]CC",
"Jpsi" : "[B+ -> K+ ^( J/psi(1S) -> mu+ mu-)]CC",
"muplus" : "[B+ -> K+ ( J/psi(1S) -> ^mu+ mu-)]CC",
"muminus" : "[B+ -> K+ ( J/psi(1S) -> mu+ ^mu-)]CC",
})
LoKi_All = tuple.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_All")
LoKi_All.Variables = {
'MINIPCHI2' : "MIPCHI2DV(PRIMARY)",
'MINIP' : "MIPDV(PRIMARY)",
'IPCHI2_OWNPV' : "BPVIPCHI2()",
'IP_OWNPV' : "BPVIP()"
示例5: ProcStatusCheck
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
# Create the actual Stripping configurable
filterBadEvents = ProcStatusCheck()
sc = StrippingConf(Streams=[custom_stream],
MaxCandidates=2000,
AcceptBadEvents=False,
BadEventSelection=filterBadEvents)
# The output is placed directly into Phys, so we only need to
# define the stripping line here
line = 'D2hhCompleteEventPromptDst2D2RSLine'
# Create an ntuple to capture D*+ decays from the StrippingLine line
dtt = DecayTreeTuple('TupleDstToD0pi_D0ToKpi')
dtt.Inputs = ['/Event/Phys/{0}/Particles'.format(line)]
dtt.Decay = '[D*(2010)+ -> (D0 -> K- pi+) pi+]CC'
# Configure DaVinci
# Important: The selection sequence needs to be inserted into
# the Gaudi sequence for the stripping to run
DaVinci().appendToMainSequence([event_node_killer, sc.sequence()])
DaVinci().UserAlgorithms += [dtt]
DaVinci().InputType = 'DST'
DaVinci().TupleFile = 'DVntuple.root'
DaVinci().PrintFreq = 1000
DaVinci().DataType = '2012'
DaVinci().Simulation = True
# Only ask for luminosity information when not using simulated data
DaVinci().Lumi = not DaVinci().Simulation
示例6: Selection
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
'Beauty -> (phi(1020) -> K+ K-) (X0 -> ^pi+ X-)' : 'K+',
'Beauty -> (phi(1020) -> K+ K-) (X0 -> X+ ^pi-)' : 'K-',
'Beauty -> (phi(1020) -> K+ K-) (X0 -> X+ X-)' : 'B_s0'})
_ddChangeSel = Selection( "_ddChangeSel",
Algorithm = _SubstituteB0,
RequiredSelections = [_strippingOutput]) #[DataOnDemand(Location = "/Event/AllStreams/Phys/BsPhiRhoLine/Particles")])
selSeq = Selection("selSeq",
Algorithm = FilterDesktop("BsPhiRhoFilter", Code = newDecay),
RequiredSelections = [_ddChangeSel])
# selSeq = SelectionSequence("selseqname", TopSelection = _ddChangeSel)
tuple = DecayTreeTuple()
if not IsMC:
tuple.Inputs = [ "/Event/Bhadron/Phys/BsPhiRhoLine/Particles" ]
elif not myDecayType and IsMC:
tuple.Inputs = [ "/Event/AllStreams/Phys/BsPhiRhoLine/Particles" ]
elif myDecayType and IsMC:
tuple.Inputs = [ '/Event/Phys/selSeq/Particles' ]
# tuple.Inputs = [ selSeq.outputLocation() ]
tuple.ToolList += [
# "TupleToolMCTruth",
"TupleToolMCBackgroundInfo",
"TupleToolGeometry"
, "TupleToolKinematic"
, "TupleToolPropertime"
, "TupleToolPrimaries"
, "TupleToolPid"
, "TupleToolTrackInfo"
示例7: DecayTreeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
########################################################################
#
# J/psi n-tuple
#
# @author Bilas Pal
# @date 2010-11-01
######
########################################################################
from Gaudi.Configuration import *
#
# DecayTreeTuple
#
from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolTagging
from Configurables import FitDecayTrees, TupleToolGeometry
tuple = DecayTreeTuple('Lb2JpsiLTree')
tuple.Inputs = [ 'Phys/Bs2Jpsif0' ]
tuple.TupleName = "mytree"
tuple.ToolList = [
"TupleToolGeometry",
"TupleToolKinematic",
"TupleToolEventInfo",
# "TupleToolTISTOS",
"TupleToolPid",
"TupleToolTrackInfo",
# "TupleToolTagging"
]
tistos = TupleToolTISTOS("tistos")
tistos.VerboseL0 = 1
tistos.VerboseHlt1 = 1
示例8: DecayTreeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
from DecayTreeTuple.Configuration import *
from Configurables import DecayTreeTuple, LoKi__Hybrid__TupleTool, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolSelResults, TupleToolTrackInfo, TupleToolEventInfo, TupleToolVtxIsoln, TupleToolTrackIsolation, TupleToolAngles, TupleToolRecoStats
# Stream and stripping line we want to use
stream = 'AllStreams'
line = 'D2XMuMu_KOSLine'
# Create an ntuple to capture D*+ decays from the StrippingLine line
dtt = DecayTreeTuple('D2KmumuOSTuple')
dtt.Inputs = ['/Event/{0}/Phys/{1}/Particles'.format(stream, line)]
dtt.Decay = '[D+ -> ^K+ ^mu+ ^mu-]CC'
dtt.ToolList += [
"TupleToolGeometry"
, "TupleToolKinematic"
, "TupleToolPropertime"
, "TupleToolPrimaries"
, "TupleToolPid"
, "TupleToolEventInfo"
, "TupleToolTrackInfo"
, "TupleToolTrigger"
, "TupleToolAngles"
# , "TupleToolVtxIsoln"
, "TupleToolTrackIsolation"
, "TupleToolTrigger"
, "TupleToolTISTOS"
, "TupleToolEventInfo"
, "TupleToolRecoStats"
]
dtt.addTool(TupleToolTISTOS("TupleToolTISTOS"))
示例9: makeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [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: SelectionSequence
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
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
示例11: EventNodeKiller
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
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"
#, "TupleToolMCBackgroundInfo"
示例12: Selection
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
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"
, "TupleToolRecoStats"
, "TupleToolTrigger",
"TupleToolPid",
"TupleToolPrimaries",
"TupleToolAngles",
"TupleToolEventInfo",
"TupleToolGeometry",
"TupleToolKinematic",
"TupleToolPropertime",
示例13: DecayTreeTuple
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
# TopSelection = tau_selection)
#EventPreSelector = prescaler)
############################################################
############################################################
## Make tuple
############################################################
from Configurables import FitDecayTrees, DecayTreeTuple, TupleToolDecayTreeFitter, TupleToolDecay, TupleToolTrigger, TupleToolTISTOS, TupleToolPropertime, PropertimeFitter, TupleToolKinematic, TupleToolGeometry, TupleToolEventInfo, TupleToolPrimaries, TupleToolPid, TupleToolTrackInfo, TupleToolRecoStats, TupleToolMCTruth, TupleToolMCBackgroundInfo, LoKi__Hybrid__TupleTool, LoKi__Hybrid__EvtTupleTool
from DecayTreeTuple.Configuration import *
tuple = DecayTreeTuple() # I can put as an argument a name if I use more than a DecayTreeTuple
tuple.Inputs = [ tau_sequence.outputLocation() ]
tuple.Decay = dec
tuple.ToolList = ['TupleToolKinematic',
'TupleToolEventInfo',
'TupleToolTrackInfo',
'TupleToolPid',
'TupleToolGeometry',
'TupleToolAngles', # Helicity angle
#'TupleToolP2VV', # various angles, not useful in my analysis because only default values
'TupleToolPropertime', #proper time TAU of reco particles
#'TupleToolPrimaries', #num primary vertices and coords
]
# Track isolation
tuple.addTupleTool('TupleToolTrackIsolation/TrackIsolation')
tuple.TrackIsolation.MinConeAngle = 0.5
示例14: ProcStatusCheck
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
MyStream.appendLines( [ line ] )
from Configurables import ProcStatusCheck
filterBadEvents = ProcStatusCheck()
sc = StrippingConf( Streams = [ MyStream ],
MaxCandidates = 2000,
AcceptBadEvents = False,
BadEventSelection = filterBadEvents )
from Configurables import DecayTreeTuple
tuple= DecayTreeTuple('LC_OS')
tuple.Inputs = [ "Phys/Tau23MuTau2PMuMuLine/Particles" ]
tuple.UseLoKiDecayFinders = False
#tuple.IgnoreP2PVFromInputLocations = True # ignore all stored Particle -> PV relations
tuple.ReFitPVs = True # re-fit the PVs
tuple.Decay = '[Lambda_c+ -> ^p+ ^mu+ ^mu- ]cc'
tuple.ToolList += [ "TupleToolEventInfo"
, "TupleToolGeneration"
, "TupleToolMCTruth"
, "TupleToolMCBackgroundInfo"
, "TupleToolPrimaries"
, "TupleToolTrackInfo"
, "TupleToolPid"
, "TupleToolGeometry"
, "TupleToolKinematic"
, "TupleToolMuonVariables"
, "TupleToolPropertime"
示例15: SelectionSequence
# 需要导入模块: from Configurables import DecayTreeTuple [as 别名]
# 或者: from Configurables.DecayTreeTuple import Inputs [as 别名]
BuKFilteredSel_Seq= SelectionSequence("BuKFilteredSel_Seq",TopSelection=BuKFilteredSel)
#from SelPy.graph import graph
#graph(BuSel, format='png')
from Configurables import DecayTreeTuple
from Configurables import TupleToolL0Calo
from DecayTreeTuple.Configuration import *
tuple=DecayTreeTuple()
tuple.Decay="[B+ -> ^K+ ^(eta_prime -> ^(rho(770)0 -> ^pi+ ^pi-) ^gamma)]CC"
tuple.addBranches({'Bu':"[B+ -> K+ (eta_prime -> (rho(770)0 -> pi+ pi-) gamma)]CC"})
tuple.Inputs=[BuKFilteredSel_Seq.outputLocation()]
tuple.addTool(TupleToolL0Calo())
tuple.TupleToolL0Calo.TriggerClusterLocation="/Event/Trig/L0/Calo"
tuple.TupleToolL0Calo.WhichCalo="HCAL"
tuple.ToolList += [
"TupleToolGeometry"
, "TupleToolDira"
, "TupleToolAngles"
, "TupleToolPid"
, "TupleToolKinematic"
, "TupleToolPropertime"
, "TupleToolPrimaries"
, "TupleToolEventInfo"
, "TupleToolTrackInfo"