當前位置: 首頁>>代碼示例>>Python>>正文


Python DaVinci.DataType方法代碼示例

本文整理匯總了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
開發者ID:alexpearce,項目名稱:Lc2pXX-SVN,代碼行數:27,代碼來源:davinci.py

示例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
開發者ID:MannyMoo,項目名稱:baryon-lifetimes-run-I,代碼行數:33,代碼來源:Str20_writeTuple_PromptD2hh.py

示例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
#.........這裏部分代碼省略.........
開發者ID:betatim,項目名稱:potential-spice,代碼行數:103,代碼來源:davinci-turbo-job.py

示例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


開發者ID:akanevm,項目名稱:HCCRAB3,代碼行數:29,代碼來源:StrippingGrid.py

示例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  = ...
開發者ID:chaen,項目名稱:first-analysis-steps,代碼行數:32,代碼來源:18-tistos.py

示例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'
開發者ID:MannyMoo,項目名稱:ip-resolutions,代碼行數:15,代碼來源:dvopts.py


注:本文中的Configurables.DaVinci.DataType方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。