本文整理汇总了Python中PhysSelPython.Wrappers.SelectionSequence.sequence方法的典型用法代码示例。如果您正苦于以下问题:Python SelectionSequence.sequence方法的具体用法?Python SelectionSequence.sequence怎么用?Python SelectionSequence.sequence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhysSelPython.Wrappers.SelectionSequence
的用法示例。
在下文中一共展示了SelectionSequence.sequence方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: add_mc_unbiased_sequence
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
def add_mc_unbiased_sequence(self, decayDesc, arrow = '==>',
toolList = ["TupleToolPropertime",
"TupleToolKinematic",
"TupleToolGeometry",
"TupleToolEventInfo",
"TupleToolPrimaries",
"TupleToolPid",
"TupleToolANNPID",
"TupleToolTrackInfo",
"TupleToolRecoStats",],
mcToolList = ['TupleToolMCTruth',
'TupleToolMCBackgroundInfo',
'MCTupleToolPrompt'],
L0List = [],
HLT1List = [],
HLT2List = [],
strippingList = []) :
sel = build_mc_unbiased_selection(decayDesc, arrow)
selseq = SelectionSequence(decayDesc.get_full_alias() + '_MCSeq',
TopSelection = sel)
seq = selseq.sequence()
seq.Members.insert(0, CheckPV())
dtt = DecayTreeTuple(decayDesc.get_full_alias() + '_MCTuple',
Decay = decayDesc.to_string(carets = True),
Inputs = [sel.outputLocation()],
ToolList = [])
dtt.addBranches(decayDesc.branches())
headBranch = getattr(dtt, decayDesc.get_alias())
dtt.configure_tools(toolList = toolList,
mcToolList = mcToolList,
L0List = L0List,
HLT1List = HLT1List,
HLT2List = HLT2List,
strippingList = strippingList,
headBranch = headBranch)
lokituple = headBranch.addTupleTool('LoKi::Hybrid::TupleTool')
lokituple.Preambulo = ['from LoKiPhysMC.decorators import *',
'from LoKiPhysMC.functions import mcMatch']
mcmatch = 'switch(mcMatch({0!r}), 1, 0)'.format(decayDesc.to_string(carets = False,
arrow = '==>'))
lokituple.Variables = {'mcMatch' : mcmatch}
seq.Members.append(dtt)
self.UserAlgorithms.append(seq)
mcdtt = MCDecayTreeTuple(decayDesc.get_full_alias() + '_MCDecayTreeTuple')
mcdtt.Decay = decayDesc.to_string(arrow = arrow, carets = True)
self.UserAlgorithms.append(mcdtt)
return seq
示例2: SelectionSequence
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
RequiredSelections=strippingSels
)
selSeq = SelectionSequence('SelSeq', TopSelection=selSub)
# Create an ntuple to capture D*+ decays from the new selection
from Configurables import DecayTreeTuple
dtt = DecayTreeTuple('TupleDstToD0pi_D0Topipi')
dtt.Inputs = [selSeq.outputLocation()]
# note the redefined decay of the D0
dtt.Decay = '[D*(2010)+ -> ^(D0 -> ^pi- ^pi+) ^pi+]CC'
# add our new selection and the tuple into the sequencer
from Configurables import GaudiSequencer, DaVinci
seq = GaudiSequencer('MyTupleSeq')
seq.Members += [selSeq.sequence()]
seq.Members += [dtt]
DaVinci().appendToMainSequence([seq])
# from previous file
from PhysConf.Filters import LoKi_Filters
fltrs = LoKi_Filters(STRIP_Code = "(HLT_PASS_RE('StrippingFullDSTDiMuonJpsi2MuMuDetachedLineDecision'))" )
DaVinci().Simulation = False
DaVinci().EvtMax = -1 # Number of events
DaVinci().EventPreFilters = fltrs.filters('Filter')
DaVinci().UserAlgorithms = [ seq, tuple ]
from Configurables import CondDB
#CondDB(UseOracle = True)
#importOptions("$APPCONFIGOPTS/DisableLFC.py")
#CondDB().IgnoreHeartBeat = True
示例3: configure
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
#.........这里部分代码省略.........
# =========================================================================
# chi_b -> Upsilon gamma
# ========================================================================
from GaudiConfUtils.ConfigurableGenerators import CombineParticles
ChibCombine = CombineParticles(
DecayDescriptor="chi_b1(1P) -> J/psi(1S) gamma",
DaughtersCuts={
"gamma": " ( 350 * MeV < PT ) & ( CL > 0.01 ) "
},
CombinationCut="""
( AM - AM1 ) < 3 * GeV
""",
MotherCut=" PALL",
#
# we are dealing with photons!
#
ParticleCombiners={
'': 'LoKi::VertexFitter'
}
)
from StandardParticles import StdLooseAllPhotons # needed for chi_b
ChibSel1 = Selection(
'PreSelChib',
Algorithm=ChibCombine,
RequiredSelections=[UpsSel, StdLooseAllPhotons]
)
from GaudiConfUtils.ConfigurableGenerators import Pi0Veto__Tagger
TagAlg = Pi0Veto__Tagger(
ExtraInfoIndex=25001, # should be unique!
MassWindow=20 * MeV, # cut on delta-mass
MassChi2=-1, # no cut for chi2(mass)
)
ChibSel2 = Selection(
'Chi_b',
Algorithm=TagAlg,
RequiredSelections=[ChibSel1]
)
Chib = SelectionSequence("ChiB", TopSelection=ChibSel2)
# print 'OUTPUT!!!' , output_loc
# =========================================================================
# Upsilons
# ========================================================================
Ups = SelectionSequence("UpsSelSeq", TopSelection=UpsSel)
# ========================================================================
from Configurables import GaudiSequencer
myChibSeq = GaudiSequencer('MyChibSeq')
myChibSeq.Members = [Chib.sequence()] + ["ChibAlg"]
myUpsSeq = GaudiSequencer('MyUpsSeq')
myUpsSeq.Members = [Ups.sequence()] + ["UpsilonAlg"]
davinci = DaVinci(
EventPreFilters=filters,
DataType='2011',
Simulation=True,
InputType='DST',
HistogramFile="chib_histos.root",
TupleFile="chib_tuples.root",
PrintFreq=1000,
Lumi=True,
EvtMax=-1
)
davinci.UserAlgorithms = [myChibSeq, myUpsSeq]
# =========================================================================
from Configurables import Gaudi__IODataManager as IODataManager
IODataManager().AgeLimit = 2
# =========================================================================
# come back to Bender
setData(datafiles, catalogs, castor)
gaudi = appMgr()
alg_chib = ChibMC(
'ChibAlg', # Algorithm name ,
# input particles
Inputs=[
Chib.outputLocation()
],
# take care about the proper particle combiner
ParticleCombiners={'': 'LoKi::VertexFitter'}
)
alg_ups = UpsilonMC(
'UpsilonAlg', # Algorithm name ,
# input particles
Inputs=[
Ups.outputLocation()
],
# take care about the proper particle combiner
ParticleCombiners={'': 'LoKi::VertexFitter'}
)
alg_chib.nb = alg_ups.nb = params['nb']
alg_chib.np = alg_ups.np = params['np']
# =========================================================================
return SUCCESS
示例4: CombineParticles
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
# #----Selection /\b -> J/psi /\-------------------
# _Lb2JpsiL = CombineParticles( "_Lb2JpsiL",
# DecayDescriptor = "[Lambda_b0 -> J/psi(1S) Lambda0]cc",
# CombinationCut = "AM < 6000. * MeV",
#
# ReFitPVs = True )
# Lb2JpsiL = Selection( "Lb2JpsiL",
# Algorithm = _Lb2JpsiL ,
# RequiredSelections = [ Jpsi2MuMu, FilterL ] )
### Gaudi sequence
# SeqL2ppi = SelectionSequence("SeqL2ppi", TopSelection = L2ppi)
# seq = SeqL2ppi.sequence()
SeqFilterL = SelectionSequence("SeqFilterL", TopSelection = FilterL)
seq = SeqFilterL.sequence()
#--------------------------------------------------------------------------
# Configure DaVinci
#-------------------------------------------------------------------------
from Configurables import DaVinci
# DaVinci().appendToMainSequence( [sc.sequence() ] ) # Append the stripping selection sequence to DaVinci
from Configurables import OfflineVertexFitter
from Configurables import DecayTreeTuple, MCDecayTreeTuple
importOptions("Xb2JpsiXTreeMC.py")
tuple = DecayTreeTuple( "L2ppiTree" )
示例5: DaVinci
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
"TupleToolMCBackgroundInfo",
]
from Configurables import DaVinci
# Name of tuple file you want to write out.
DaVinci().TupleFile = "JPsi2KsKs.root"
DaVinci().EvtMax = -1
DaVinci().DataType = "2012"
DaVinci().Simulation = isMC
# This is very useful to make sure you didn't accidently miss some data.
# Adds tuple in same file with lumi (units are pb-1).
DaVinci().Lumi = not isMC
# These database tags are used to specify the relevent conditions for your dataset.
# They can normally be found on the bookkeeping.
from Configurables import CondDB
# Here is a trick we just use the latest tags for 2012 data rather than hardocding them in
# , which is what we want to run on.
CondDB().LatestGlobalTagByDataType = "2012"
# Here we actually tell DaVinci what to run, this will often have a
#'selection seuqence' before the ntuple stage.
DaVinci().appendToMainSequence([seq.sequence(), tuple])
if isMC:
DaVinci().UserAlgorithms += [mcTuple]
示例6: TurboConf
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
TurboConf().PersistReco = True
pions = DataOnDemand('Phys/StdAllNoPIDsPions/Particles')
ks0 = CombineParticles('Ks0Topipi',
DecayDescriptors=['[KS0 -> pi+ pi+]cc'],
CombinationCut=("AM < 320*MeV"), #parent
MotherCut="ALL")
ks0_sel = Selection(
'Sel_Ks0Topipi',
Algorithm=ks0,
RequiredSelections=[pions]
)
ks0_selseq = SelectionSequence(
'SelSeq_Ks0Topipi',
TopSelection=ks0_sel
)
dtt_ks0 = DecayTreeTuple('TupleKs0Topipi')
dtt_ks0.Inputs = ks0_selseq.outputLocations()
dtt_ks0.Decay = '[KS0 -> ^pi+ ^pi+]CC'
dtt_ks0.addBranches({
'Ks0': '[KS0 -> pi+ pi+]CC',
'pi1': '[KS0 -> ^pi+ pi+]CC',
'pi2': '[KS0 -> pi+ ^pi+]CC'
})
DaVinci().UserAlgorithms = [ks0_selseq.sequence(), dtt_ks0]
DaVinci().DataType = '2016'
DaVinci().EvtMax = 1000
DaVinci().TupleFile = 'PersistRecoTuple_ks0_pipi.root'
示例7: lumi
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
'Ks2' : '[D_s+ -> (phi(1020) -> (KS0 -> pi+ pi-) ^(KS0 -> pi+ pi-)) pi+]CC',
'pi1' : '[D_s+ -> (phi(1020) -> (KS0 -> ^pi+ pi-) (KS0 -> pi+ pi-)) pi+]CC',
'pi2' : '[D_s+ -> (phi(1020) -> (KS0 -> pi+ ^pi-) (KS0 -> pi+ pi-)) pi+]CC',
'pi3' : '[D_s+ -> (phi(1020) -> (KS0 -> pi+ pi-) (KS0 -> ^pi+ pi-)) pi+]CC',
'pi4' : '[D_s+ -> (phi(1020) -> (KS0 -> pi+ pi-) (KS0 -> pi+ ^pi-)) pi+]CC',
'pis' : '[D_s+ -> (phi(1020) -> (KS0 -> pi+ pi-) (KS0 -> pi+ pi-)) ^pi+]CC',
}
mcTuple.addBranches(mcTuple.Branches)
mcTuple.ToolList = ['MCTupleToolKinematic',
'TupleToolEventInfo',
'MCTupleToolHierarchy',
"TupleToolMCBackgroundInfo",
]
Ds_sequence.sequence().Members += [tuple]
from Configurables import DaVinci
#Name of tuple file you want to write out.
DaVinci().TupleFile = "Phi2KsKs.root"
DaVinci().EvtMax = 10000
DaVinci().DataType = '2012'
DaVinci().Simulation = isMC
#This is very useful to make sure you didn't accidently miss some data.
#Adds tuple in same file with lumi (units are pb-1).
DaVinci().Lumi = not isMC
示例8: SMEAR
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
userAlgos.Members = []
#userAlgos=[]
if IsMC:
from Configurables import TrackSmearState as SMEAR
smear = SMEAR('StateSmear')
userAlgos.Members.append(smear)
else:
#
from Configurables import CheckPV
checkpv = CheckPV("CheckPV")
checkpv.MinPVs = 1
userAlgos.Members.append(checkpv)
from Configurables import TrackScaleState as SCALER
scaler = SCALER('StateScale')
userAlgos.Members.append(scaler)
userAlgos.Members.append(selSeq.sequence())
userAlgos.Members.append(tuple)
#from Configurables import HltSelReportsDecoder, HltVertexReportsDecoder, HltDecReportsDecoder
#userAlgos.Members.append( HltSelReportsDecoder() )
#userAlgos.Members.append( HltVertexReportsDecoder() )
#userAlgos.Members.append( HltDecReportsDecoder() )
from Configurables import EventTuple
etuple = EventTuple()
userAlgos.Members.append( etuple )
myTupleName = 'BsphiKK.root'
dv = DaVinci(
HistogramFile = 'dummy.root',
示例9: configure
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
#.........这里部分代码省略.........
from GaudiConfUtils.ConfigurableGenerators import CombineParticles
# ========================================================================
# B -> J/psi + K pi pi
# ========================================================================
from GaudiConfUtils.ConfigurableGenerators import CombineParticles
bc_Kpp = CombineParticles(
DecayDescriptor='[B+ -> J/psi(1S) K+ pi+ pi-]cc',
#
Preambulo=Preambulo,
DaughtersCuts={
"J/psi(1S)": " in_range( 3.096 * GeV - 45 * MeV , M , 3.096 * GeV + 45 * MeV ) "
},
#
CombinationCut="""
in_range ( 5.0 * GeV , AM , 5.6 * GeV )
""" ,
#
MotherCut="""
in_range ( 5.1 * GeV , M , 5.5 * GeV ) &
( PT > 1 * GeV ) &
( chi2vx < 49 ) &
in_range ( 150 * micrometer , ctau , 1000 * micrometer )
""" ,
#
ParticleCombiners={'': 'LoKi::VertexFitter'},
ReFitPVs=True
)
#
from PhysSelPython.Wrappers import Selection
Bc_Kpp = Selection(
'PsiKpp',
Algorithm=bc_Kpp,
RequiredSelections=[jpsi, pions, kaons]
)
# ========================================================================
# B -> J/psi + K
# ========================================================================
from GaudiConfUtils.ConfigurableGenerators import CombineParticles
bc_K = CombineParticles(
DecayDescriptor='[ B+ -> J/psi(1S) K+ ]cc',
#
Preambulo=Preambulo,
DaughtersCuts={
"J/psi(1S)": " in_range( 3.096 * GeV - 45 * MeV , M , 3.096 * GeV + 45 * MeV ) "
},
#
CombinationCut="""
in_range ( 5.0 * GeV , AM , 5.6 * GeV )
""" ,
#
MotherCut="""
in_range ( 5.1 * GeV , M , 5.5 * GeV ) &
( PT > 1 * GeV ) &
( chi2vx < 16 ) &
in_range ( 150 * micrometer , ctau , 1000 * micrometer )
""" ,
ParticleCombiners={'': 'LoKi::VertexFitter'},
ReFitPVs=True
)
#
Bc_K = Selection(
'PsiK',
Algorithm=bc_K,
RequiredSelections=[jpsi, kaons]
)
from PhysSelPython.Wrappers import SelectionSequence
Seq_Kpp = SelectionSequence("PSIKPP", TopSelection=Bc_Kpp)
Seq_K = SelectionSequence("PSIK", TopSelection=Bc_K)
from Configurables import GaudiSequencer
davinci.UserAlgorithms = [
GaudiSequencer(
'K', Members=[Seq_K .sequence(), 'B2PsiK']),
GaudiSequencer('KPP', Members=[Seq_Kpp.sequence(), 'B2PsiKpp'])
]
#
# come back to Bender
#
setData(datafiles, catalogs, castor)
#
# start Gaudi
#
gaudi = appMgr()
#
algKpp = B2Kpp(
'B2PsiKpp', # Algorithm name ,
Inputs=[Seq_Kpp.outputLocation()]
)
algK = B2K(
'B2PsiK', # Algorithm name ,
Inputs=[Seq_K .outputLocation()]
)
return SUCCESS
示例10: SelectionSequence
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
from PhysSelPython.Wrappers import SelectionSequence
rd_SEQ = SelectionSequence ( 'DATA' , rd_selection )
###################### DAVINCI SETTINGS ############################################
lum = True
sim = False
if MODE == 'MC':
lum = False
sim = True
daVinci = DaVinci (
EvtMax = EVTMAX
, RootInTES = rootInTES
, InputType = "MDST"
, TupleFile = "DVTuples1.root"
, HistogramFile = 'DVHistos.root'
, DataType = "2011"
, Simulation = sim
, Lumi = lum
, UserAlgorithms = [rd_SEQ.sequence()]
)
MessageSvc().Format = "% F%60W%S%7W%R%T %0W%M"
###################################################################################
####################### THE END ###################################################
###################################################################################
示例11:
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
"L0LocalPi0Decision",
"L0GlobalPi0Decision",
"L0MuonDecision",
"Hlt2Topo2BodyBBDTDecision",
"Hlt2Topo3BodyBBDTDecision",
"Hlt2Topo4BodyBBDTDecision",
"Hlt2RadiativeTopoTrackTOSDecision",
"Hlt2RadiativeTopoPhotonL0Decision",
"Hlt2TopoRad2BodyBBDTDecision",
"Hlt2TopoRad2plus1BodyBBDTDecision",
"Hlt2Topo2BodySimpleDecision",
"Hlt2Topo3BodySimpleDecision",
"Hlt2Topo4BodySimpleDecision"]
Gseq=GaudiSequencer('MyTupleSeq')
Gseq.Members += [Buseq.sequence()]
Gseq.Members += [tuple]
DaVinci().InputType='DST'
DaVinci().appendToMainSequence([Gseq])
#DaVinci().UserAlgorithms+=[tuple]
DaVinci().TupleFile="Output.root"
DaVinci().HistogramFile="histos.root"
DaVinci().DataType='2012'
DaVinci().EvtMax=50
DaVinci().PrintFreq=1000
DaVinci().MoniSequence=[tuple]
DaVinci().Simulation=True
DaVinci.DDDBtag='dddb-20130929-1'
DaVinci.CondDBtag='sim-20130522-1-vc-md100'
from GaudiConf import IOHelper
示例12: MergedSelection
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
#----Selection /\->p+ pi-
AllLambda0 = MergedSelection( "AllLambda0", RequiredSelections = [Lambda0LL, Lambda0DD])
_FilterL = FilterDesktop("_FilterL")
_FilterL.Code = "(ADMASS('Lambda0') < 30.*MeV)"\
"& (VFASPF(VCHI2/VDOF) < 12.0)"
FilterL = Selection( "FilterL",
Algorithm = _FilterL ,
RequiredSelections = [ AllLambda0 ] )
### Gaudi sequence
SeqL = SelectionSequence("SeqL", TopSelection = FilterL)
seq = SeqL.sequence()
#--------------------------------------------------------------------------
# Configure DaVinci
#-------------------------------------------------------------------------
from Configurables import DaVinci
# DaVinci().appendToMainSequence( [sc.sequence() ] ) # Append the stripping selection sequence to DaVinci
from Configurables import OfflineVertexFitter
from Configurables import DecayTreeTuple, MCDecayTreeTuple
importOptions("Xb2JpsiXTree.py")
tuple = DecayTreeTuple( "LTree" )
示例13: OfflineVertexFitter
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
#---- Refit vertices with Jpsi mass constraint----------------
#_Lb2JpsipK.addTool( OfflineVertexFitter() )
#_Lb2JpsipK.VertexFitters.update( { "" : "OfflineVertexFitter"} )
#_Lb2JpsipK.OfflineVertexFitter.applyDauMassConstraint = True
Lb2JpsipK = Selection( "Lb2JpsipK ",
Algorithm = _Lb2JpsipK ,
RequiredSelections = [ Jpsi2MuMu, FilterL ] )
### Gaudi sequence
SeqLb2JpsipK = SelectionSequence("SeqLb2JpsipK", TopSelection = Lb2JpsipK)
seq = SeqLb2JpsipK.sequence()
#--------------------------------------------------------------------------
# Configure DaVinci
#-------------------------------------------------------------------------
from Configurables import DaVinci
from Configurables import OfflineVertexFitter
from Configurables import DecayTreeTuple, MCDecayTreeTuple
importOptions("Xb2JpsiXTree.py")
tuple = DecayTreeTuple( "Lb2JpsiLTree" )
tuple.Inputs = [ SeqLb2JpsipK.outputLocation() ]
示例14: DecayTreeTuple
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
'SelSeq_DstToD0pi',
TopSelection=dst_sel
)
dtt_dst = DecayTreeTuple('TupleDstToD0pi_D0ToKpi_PersistReco')
dtt_dst.addTupleTool('TupleToolTrackInfo')
dtt_dst.Inputs = dst_selseq.outputLocations()
dtt_dst.Decay = '[D*(2010)+ -> ^(D0 -> ^K- ^pi+) ^pi+]CC'
dtt_dst.addBranches({
'Dst': '[D*(2010)+ -> (D0 -> K- pi+) pi+]CC',
'Dst_pi': '[D*(2010)+ -> (D0 -> K- pi+) ^pi+]CC',
'D0': '[D*(2010)+ -> ^(D0 -> K- pi+) pi+]CC',
'D0_K': '[D*(2010)+ -> (D0 -> ^K- pi+) pi+]CC',
'D0_pi': '[D*(2010)+ -> (D0 -> K- ^pi+) pi+]CC',
})
dstar_hybrid = dtt_dst.Dst.addTupleTool('LoKi::Hybrid::TupleTool/LoKi_Dstar')
dstar_hybrid.Variables = {
'dstar_delta_mass': 'M - CHILD(M,1)',
}
DaVinci().UserAlgorithms = [dtt, dst_selseq.sequence(), dtt_dst]
DaVinci().DataType ='2016'
DaVinci().EvtMax=1000
DaVinci().TupleFile = 'PersistRecoTuple2.root'
示例15: configure
# 需要导入模块: from PhysSelPython.Wrappers import SelectionSequence [as 别名]
# 或者: from PhysSelPython.Wrappers.SelectionSequence import sequence [as 别名]
#.........这里部分代码省略.........
( TRGHOSTPROB < 0.4 ) &
( PT > 200 * MeV ) &
in_range ( 2 , ETA , 4.9 ) &
in_range ( 3.2 * GeV , P , 150 * GeV ) &
HASRICH &
( PROBNNk > 0.15 ) &
( MIPCHI2DV() > 9. )
"""
from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
_alg_pi = FilterDesktop(
##
Code=_PionCut_,
##
)
from PhysSelPython.Wrappers import Selection
from StandardParticles import StdAllNoPIDsPions as input_pions
pions = Selection(
"SelPiForBQ",
Algorithm=_alg_pi,
RequiredSelections=[input_pions]
)
from GaudiConfUtils.ConfigurableGenerators import FilterDesktop
_alg_k = FilterDesktop(
##
Code=_KaonCut_,
##
)
from PhysSelPython.Wrappers import Selection
from StandardParticles import StdAllNoPIDsKaons as input_kaons
kaons = Selection(
"SelKForBQ",
Algorithm=_alg_k,
RequiredSelections=[input_kaons]
)
def _kaons_(self):
return kaons
def _pions_(self):
return pions
#
## get the selections
#
for s in [PsiX]:
s.pions = _pions_
s.kaons = _kaons_
logger.warning("Redefine PsiX.kaons ")
logger.warning("Redefine PsiX.kaons ")
psix = PsiX('PsiX', {})
for s in [psix.psi_3Kpi()]:
a = s.algorithm()
a.ParticleCombiners = {'': 'LoKi::VertexFitter:PUBLIC'}
from PhysSelPython.Wrappers import SelectionSequence
sel_seq = SelectionSequence('B2Psi3Kpi', psix . psi_3Kpi())
davinci = DaVinci(
InputType = 'DST' ,
Simulation = True ,
PrintFreq = 1000 ,
EvtMax = -1 ,
Lumi = True ,
DataType = params['Year'],
DDDBtag = params['DDDB'],
CondDBtag = params['SIMCOND'],
# HistogramFile = 'DVHistos.root' ,
TupleFile = 'DVNtuples.root' ,
)
my_name = "Bplus"
from Configurables import GaudiSequencer
davinci.UserAlgorithms = [ sel_seq.sequence() , my_name ]
setData ( datafiles , catalogs , castor )
gaudi = appMgr()
print 'seq.outputLocation()= ', sel_seq.outputLocation() # Phys/SelPsi3KPiForPsiX/Particles
# create local algorithm:
alg = MCAnalysisAlgorithm(
my_name,
Inputs = [
sel_seq.outputLocation()
] ,
PP2MCs = [ 'Relations/Rec/ProtoP/Charged' ]
)
return SUCCESS