本文整理汇总了Python中Configurables.DaVinci.DataType方法的典型用法代码示例。如果您正苦于以下问题:Python DaVinci.DataType方法的具体用法?Python DaVinci.DataType怎么用?Python DaVinci.DataType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurables.DaVinci
的用法示例。
在下文中一共展示了DaVinci.DataType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: configure
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import DataType [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: TupleToolTISTOS
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import DataType [as 别名]
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
################
# Configure DaVinci
################
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
示例3: execute
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import DataType [as 别名]
def execute(simulation=True,
turbo=True,
decay_descriptor="J/psi(1S) -> mu- mu+"):
# Configure all the unpacking, algorithms, tags and input files
appConf = ApplicationMgr()
appConf.ExtSvc+= ['ToolSvc', 'DataOnDemandSvc', LoKiSvc()]
ConfigTarFileAccessSvc().File = 'config.tar'
dv = DaVinci()
dv.DataType = "2012"
lhcbApp = LHCbApp()
lhcbApp.Simulation = simulation
CondDB().Upgrade = False
dtt = DecayTreeTuple("Early2015")
if turbo:
tesla_prefix = "Hlt2DiMuonJPsi"
dtt.Inputs = ["/Event/"+tesla_prefix+"/Particles"]
dtt.InputPrimaryVertices = "/Event/"+tesla_prefix+"/Primary"
dtt.WriteP2PVRelations = False
else:
LHCbApp().DDDBtag = "dddb-20140729"
polarity = "u"
LHCbApp().CondDBtag = "sim-20140730-vc-m%s100"%polarity
muons = AutomaticData(Location="Phys/StdAllLooseMuons/Particles")
jpsi = CombineParticles('MyJPsi')
jpsi.DecayDescriptors = [decay_descriptor]
jpsi.CombinationCut = "(AM < 7100.0 *GeV)"
jpsi.DaughtersCuts = {"": "ALL", "mu+": "ALL", "mu-": "ALL"}
jpsi.MotherCut = "(VFASPF(VCHI2/VDOF) < 999999.0)"
code = """
('J/psi(1S)' == ID) &
in_range(2.990*GeV, M, 3.210*GeV) &
DECTREE('%s') &
CHILDCUT(1, HASMUON & ISMUON) &
CHILDCUT(2, HASMUON & ISMUON) &
(MINTREE('mu+' == ABSID, PT) > 700*MeV) &
(MAXTREE(ISBASIC & HASTRACK, TRCHI2DOF) < 5) &
(MINTREE(ISBASIC & HASTRACK, CLONEDIST) > 5000) &
(VFASPF(VPCHI2) > 0.5/100) &
(abs(BPV(VZ)) < 0.5*meter) &
(BPV(vrho2) < (10*mm)**2)
"""%(decay_descriptor)
# similar to the HLT2 line
code = """
(ADMASS('J/psi(1S)')< 120*MeV) &
DECTREE('%s') &
(PT>0*MeV) &
(MAXTREE('mu-'==ABSID,TRCHI2DOF) < 4) &
(MINTREE('mu-'==ABSID,PT)> 0*MeV) &
(VFASPF(VCHI2PDOF)< 25)
"""%(decay_descriptor)
filter_jpsi = FilterDesktop("MyFilterJPsi",
Code=code,
Preambulo=["vrho2 = VX**2 + VY**2"],
ReFitPVs=True,
#IgnoreP2PVFromInputLocations=True,
#WriteP2PVRelations=True
)
jpsi_sel = Selection("SelMyJPsi", Algorithm=jpsi, RequiredSelections=[muons])
filter_jpsi_sel = Selection("SelFilterMyJPsi",
Algorithm=filter_jpsi,
RequiredSelections=[jpsi_sel])
jpsi_seq = SelectionSequence("SeqMyJPsi", TopSelection=filter_jpsi_sel)
dtt.Inputs = [jpsi_seq.outputLocation()]
# Overwriting default list of TupleTools
dtt.ToolList = ["TupleToolKinematic",
"TupleToolPid",
"TupleToolEventInfo",
"TupleToolMCBackgroundInfo",
"TupleToolMCTruth",
#"MCTupleToolHierarchy",
#"MCTupleToolPID",
"TupleToolGeometry",
"TupleToolTISTOS",
# with turbo this crashes
#"TupleToolTrackInfo",
"TupleToolTrigger",
]
tlist = ["L0HadronDecision", "L0MuonDecision",
"L0DiMuonDecision", "L0ElectronDecision",
"L0PhotonDecision",
"Hlt1DiMuonHighMassDecision", "Hlt1DiMuonLowMassDecision",
"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
#.........这里部分代码省略.........
示例4: DaVinci
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import DataType [as 别名]
]
#evttuple.TupleToolTrigger.CollateTriggerList = True
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
示例5: ApplicationMgr
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import DataType [as 别名]
dec = "%sDecision" % decision
rep = reports.decReport(dec)
if rep and rep.decision():
found = True
break
if found:
break
return n
# Configure all the unpacking, algorithms, tags and input files
appConf = ApplicationMgr()
appConf.ExtSvc += ["ToolSvc", "DataOnDemandSvc", LoKiSvc()]
dv = DaVinci()
dv.DataType = "2012"
# disable for older versions of DV
# generally it seems in older versions of DV
# this whole script 'breaks' at places
# raising exceptions and yet works ...
dre = DecodeRawEvent()
dre.DataOnDemand = True
lhcbApp = LHCbApp()
lhcbApp.Simulation = True
CondDB().Upgrade = False
# don't really need tags for looking around
# LHCbApp().DDDBtag = ...
# LHCbApp().CondDBtag = ...
示例6: DaVinci
# 需要导入模块: from Configurables import DaVinci [as 别名]
# 或者: from Configurables.DaVinci import DataType [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'