コード例 #1
0
# set up some useful paths of locations on the MicroDST
flavTagPath = locationRoot + "/" + mainLocation + "/FlavourTags"
lhcbApp = LHCbApp()
lhcbApp.DDDBtag = 'default'
lhcbApp.CondDBtag = 'default'

appMgr = AppMgr(outputlevel=4)
appMgr.config(files=['$GAUDIPOOLDBROOT/options/GaudiPoolDbRoot.opts'])
appMgr.initialize()
appMgr.ExtSvc += ['LHCb::ParticlePropertySvc']
appMgr.HistogramPersistency = "ROOT"

evtSvc = appMgr.evtSvc()
toolSvc = appMgr.toolsvc()
evtSel = appMgr.evtSel()
nextEvent = Functors.NextEvent(appMgr)
pp = Functors.PartPropSvc(appMgr)
ppSvc = pp
particleNameFunc = Functors.ParticleName(ppSvc)

# open a DST or MicroDST
evtSel.open(microDSTFile)

histoPath = "MicroDST/Histos/"

omegaPlots = {}
# flavour tagging plot: plot mistag for each category.
for cat in range(0, 6):
    omegaPlots[cat] = book(histoPath + "FlavourTags/MisTagCat" + str(cat),
                           "Mis-tag fraction category " + str(cat), 100, 0.,
コード例 #2
0
ファイル: KaliPi0.py プロジェクト: marromlam/lhcb-software
    #pattern  = '/lhcb/LHCb/Collision12/FMDST/00021391/0000/00021391_00000%03d_1.fmdst'

    from PRConfig import TestFileDB
    from GaudiConf.IOHelper import IOHelper

    IOHelper().inputFiles(
        TestFileDB.test_file_db["2012_CaloFemtoDST"].filenames)

    #evtSel.open ( 'KaliPi0_2k+11.fmdst_test')

    from GaudiPython.Bindings import AppMgr
    gaudi = AppMgr()

    ## === OR with test fmDSTs

    evtSel = gaudi.evtSel()

    ## run over events
    gaudi.run(5000)

    from KaliCalo.FitUtils import fitPi0, getPi0Params, s2b
    import GaudiPython.GaudiAlgs
    pi0 = gaudi.algorithm('KaliPi0')
    histos = pi0.Histos()
    if histos:
        keys = histos.keys()
        keys.sort()
        for h in keys:
            histo = histos[h]
            if hasattr(histo, 'dump'):
                print histo.dump(60, 25, True)