本文整理汇总了Python中Configurables.DaVinci.TupleFile方法的典型用法代码示例。如果您正苦于以下问题:Python DaVinci.TupleFile方法的具体用法?Python DaVinci.TupleFile怎么用?Python DaVinci.TupleFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurables.DaVinci
的用法示例。
在下文中一共展示了DaVinci.TupleFile方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configure
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
def configure(year, mc):
"""General configuration of DaVinci options.
Keyword arguments:
year -- One of lc2pxx.config.years
mc -- True if booking MC ntuples, else false
"""
dv = DaVinci()
# Output ntuple name
dv.TupleFile = "DVntuple.root"
# Process all events
dv.EvtMax = -1
# Print status every 1000 events
dv.PrintFreq = 1000
# Number of events to skip at the beginning of each file
dv.SkipEvents = 0
dv.DataType = str(year)
dv.Simulation = mc
# Collision streams for Charm are on microDST, and in MC
if not mc:
dv.InputType = "MDST"
# See "Question about microDST and RootInTES" in lhcb-davinci
dv.RootInTES = "/Event/Charm"
# Add a GetIntegratedLuminosity/LumiTuple TTree to output, but not in MC
dv.Lumi = not mc
示例2: DaVinci
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
################
from Configurables import DaVinci, L0Conf
dv = DaVinci()
dv.DataType = '2012'
dv.EvtMax = -1
for line_info in line_infos:
print line_info
tuple = makeDecayTreeTuple( line_info[0], line_info[1], line_info[2], line_info[3] )
dv.UserAlgorithms += [ tuple ]
dv.Simulation = False
#from Configurables import CondDB
#CondDB(UseOracle = True)
DaVinci().DDDBtag = "dddb-20120831"
DaVinci().CondDBtag = "cond-20121211"
DaVinci().EnableUnpack = ['Stripping','Reconstruction']
dv.Lumi = True
dv.HistogramFile = "DVHistos.root" # Histogram file
dv.TupleFile = "DVNtuples.root" # Ntuple
# to test rejecting hot CALO cells
#from Gaudi.Configuration import *
#def recomputeL0Calo():
# from Configurables import L0CaloAlg
# DataOnDemandSvc().AlgMap[ 'Trig/L0/FullCalo' ] = L0CaloAlg( WriteOnTES = True , WriteBanks = False )
# DataOnDemandSvc().AlgMap[ 'Trig/L0/Calo' ] = L0CaloAlg( WriteOnTES = True , WriteBanks = False )
#
#appendPostConfigAction(recomputeL0Calo)
示例3: execute
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
#.........这里部分代码省略.........
"Hlt1TrackMuonDecision", "Hlt1TrackAllL0Decision",
"Hlt2DiMuonJPsiDecision", "Hlt2SingleMuonDecision",
]
dtt.addTool(TupleToolTrigger, name="TupleToolTrigger")
dtt.addTool(TupleToolTISTOS, name="TupleToolTISTOS")
# Get trigger info
dtt.TupleToolTrigger.Verbose = True
dtt.TupleToolTrigger.TriggerList = tlist
dtt.TupleToolTISTOS.Verbose = True
dtt.TupleToolTISTOS.TriggerList = tlist
from Configurables import TupleToolMCTruth, MCTupleToolHierarchy
dtt.addTool(TupleToolMCBackgroundInfo,
name="TupleToolMCBackgroundInfo")
dtt.TupleToolMCBackgroundInfo.Verbose = True
dtt.addTool(MCTupleToolHierarchy,
name="MCTupleToolHierarchy")
dtt.MCTupleToolHierarchy.Verbose = True
dtt.addTool(TupleToolMCTruth,
name="TupleToolMCTruth")
dtt.TupleToolMCTruth.Verbose = True
if turbo:
assoc_seq = TeslaTruthUtils.associateSequence(tesla_prefix, False)
ChargedPP2MC(tesla_prefix+"ProtoAssocPP").OutputLevel = 1
assoc_seq.Members.insert(0, PatLHCbID2MCParticle())
from Configurables import MuonCoord2MCParticleLink
muon_coords = MuonCoord2MCParticleLink("TeslaMuonCoordLinker")
assoc_seq.Members.insert(1, muon_coords)
TrackAssociator("TeslaAssocTr").DecideUsingMuons = True
relations = TeslaTruthUtils.getRelLoc(tesla_prefix)
else:
relations = "Relations/Rec/ProtoP/Charged"
TeslaTruthUtils.makeTruth(dtt,
relations,
["MCTupleToolKinematic",
"MCTupleToolHierarchy",
"MCTupleToolPID",
]
)
dtt.Decay = mark(2, mark(3, decay_descriptor)) #"J/psi(1S) -> ^mu- ^mu+"
dtt.addBranches({"X": "^(%s)"%(decay_descriptor),
"muplus": mark(3, decay_descriptor),#"J/psi(1S) -> mu- ^mu+",
"muminus": mark(2, decay_descriptor),#"J/psi(1S) -> ^mu- mu+",
})
x_preamble = ["DZ = VFASPF(VZ) - BPV(VZ)",
]
x_vars = {"ETA": "ETA",
"Y": "Y",
"PHI": "PHI",
"VPCHI2": "VFASPF(VPCHI2)",
"DELTAZ": "DZ",
# DZ * M / PZ / c with c in units of mm/s
# XXX should this be the PDG mass or measured mass?
#"TZ": "DZ*M / PZ / 299792458000.0", #seconds
"TZ": "DZ*3096.916 / PZ/299792458000.0*(10**12)", #ps
"minpt": "MINTREE('mu+' == ABSID, PT)",
"minclonedist": "MINTREE(ISBASIC & HASTRACK, CLONEDIST)",
"maxtrchi2dof": "MAXTREE(ISBASIC & HASTRACK, TRCHI2DOF)",
}
muon_vars = {"ETA": "ETA",
"Y": "Y",
"PHI": "PHI",
"CHARGE": "Q",
"CLONEDIST": "CLONEDIST",
"TRCHI2DOF": "TRCHI2DOF",
}
loki_X = dtt.X.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_X")
loki_X.Variables = x_vars
loki_X.Preambulo = x_preamble
loki_mup = dtt.muplus.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_MuPlus")
loki_mup.Variables = muon_vars
#dtt.muplus.addTupleTool("TupleToolGeometry")
loki_mum = dtt.muminus.addTupleTool("LoKi::Hybrid::TupleTool/LoKi_MuMinus")
loki_mum.Variables = muon_vars
#dtt.muminus.addTupleTool("TupleToolGeometry")
dv.TupleFile = "DVNtuples.root"
if turbo:
dv.UserAlgorithms = [assoc_seq, dtt]
else:
assocpp = ChargedPP2MC("TimsChargedPP2MC")
assocpp.OutputLevel = 1
dv.UserAlgorithms = [jpsi_seq.sequence(), assocpp, dtt]
示例4: DaVinci
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
evttuple.addTool(LoKiTool)
evttuple.TupleName = "EventInfo"
dv = DaVinci()
dv.DataType = "2010"
dv.Simulation = False
dv.EvtMax = -1
dv.TupleFile = 'b2hh_stripped.root'
dv.PrintFreq = 100
condDB = CondDB()
condDB.UseOracle = True
dv.DDDBtag = "head-20100518"
dv.CondDBtag = "head-20100715"
dv.Lumi = True
示例5: __init__
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
def __init__(self, fname, version, linename, datafile, explicitTags = False,
useTrackScaleState = True,
toolList = ["TupleToolPropertime",
"TupleToolKinematic",
"TupleToolGeometry",
"TupleToolEventInfo",
"TupleToolPrimaries",
"TupleToolPid",
"TupleToolANNPID",
"TupleToolTrackInfo",
"TupleToolRecoStats",],
mcToolList = ['TupleToolMCTruth',
'TupleToolMCBackgroundInfo',
'MCTupleToolPrompt'],
L0List = [],
HLT1List = [],
HLT2List = [],
strippingList = [],
aliases = {},
labXAliases = False,
substitutions = {},
optssuffix = 'settings',
extraopts = '',
extraoptsfile = '',
datatype = None,
diracversion = None,
force = False) :
from Configurables import GaudiSequencer, DaVinci, TupleToolStripping, \
TupleToolTrigger
# Defines Simulation, CondDBtag, DDDBtag, InputType, DataType
dv = DaVinci()
dataopts = get_data_opts(datafile, explicitTags, optssuffix, datatype, diracversion, force)
dv.configure_data_opts(dataopts)
dv.TupleFile = 'DVTuples.root'
dv.HistogramFile = 'DVHistos.root'
dv.Lumi = True
# Can't use TrackScaleState for 2015 data yet as it's not been calibrated.
if useTrackScaleState :
dv.add_TrackScaleState()
# Defines rootInTES, inputLocation, and decayDescs
lineopts = get_line_settings(linename, version, os.path.split(fname)[0], optssuffix, force)
lineopts, lineseq = dv.add_line_tuple_sequence(lineopts,
toolList, mcToolList,
L0List, HLT1List, HLT2List, strippingList,
aliases, labXAliases, substitutions)
dtt = lineseq.Members[-1]
if dataopts['Simulation'] :
mcunbseqs = []
for desc in lineopts['decayDescs'] :
mcunbseq = dv.add_mc_unbiased_sequence(desc)
mcunbseqs.append(mcunbseq)
localns = dict(locals())
localns.update(globals())
if extraopts :
exec extraopts in localns
if extraoptsfile :
execfile(os.path.expandvars(extraoptsfile)) in localns
objsdict = {'dv' : dv}
Script.__init__(self, fname, dv.extraobjs, objsdict)
示例6: stripping_line_name
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
'Hlt2TopoMu4BodyBBDT',
'Hlt2TopoE2BodyBBDT',
'Hlt2TopoE3BodyBBDT',
'Hlt2TopoE4BodyBBDT',
'Hlt2TopoRad2BodyBBDT',
'Hlt2TopoRad2plus1BodyBBDT',
'Hlt2IncPhi',
'Hlt2IncPhiSidebands']))
args = argparser.parse_args()
linename = stripping_line_name('Pi', args.baryon)
strippingList = [stripping_line_name(bachelor, baryon) for bachelor in 'Pi', 'K' for baryon in 'Lc', 'Xic']
dv = DaVinci()
dv.TupleFile = 'DVTuples.root'
dv.HistogramFile = 'DVHistos.root'
dv.Lumi = True
dv.configure_data_opts(get_data_opts(args.datafile))
# Substitute PID of the head if it's Xib -> Xic as it's labelled as
# Lb -> Xic in the stripping.
aliases = ['X_b0', 'X_c', 'p', 'K', 'pi', 'bachelorPi']
linesettings, lineseq = \
dv.add_line_tuple_sequence(get_line_settings(linename, args.version),
L0List = args.L0List.split(),
HLT1List = args.HLT1List.split(),
HLT2List = args.HLT2List.split(),
strippingList = strippingList,
aliases = aliases,
substitutions = ({} if args.baryon == 'Lc' else ['Xi_b0']))
示例7: DaVinci
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import TupleFile [as 别名]
from Configurables import DaVinci
from Configurables import Velo__VeloIPResolutionMonitorNT as IPMoni
dv = DaVinci()
dv.DataType = '2015'
dv.DDDBtag = 'dddb-20150526'
dv.CondDBtag = 'cond-20150625'
#dv.EvtMax = 100
ipMoni = IPMoni('VeloIPResolutionMonitor')
ipMoni.CheckIDs = True
dv.UserAlgorithms = [ipMoni]
dv.TupleFile = 'IPTuple.root'