コード例 #1
0
mlog = logging.getLogger('SystemRec_config')

from AthenaCommon.GlobalFlags import globalflags
from RecExConfig.RecFlags import rec
from RecExConfig.RecAlgsFlags import recAlgs

from AthenaCommon.Resilience import treatException, protectedInclude

# use to flag domain
import PerfMonComps.DomainsRegistry as pdr

from AODFix.AODFix import *
AODFix_Init()

#First do Calo-Reco
pdr.flag_domain('calo')
protectedInclude("CaloRec/CaloRec_jobOptions.py")
AODFix_postCaloRec()

#then run ID reco:

pdr.flag_domain('id')
if DetFlags.detdescr.ID_on():
    protectedInclude("InDetRecExample/InDetRec_jobOptions.py")
    AODFix_postInDetRec()

# functionality : FTK reconstruction
if DetFlags.detdescr.FTK_on():
    protectedInclude("FTK_RecExample/FTKRec_jobOptions.py")

# functionality : Muon reconstruction
コード例 #2
0
#build subtracted cells
from HIJetRec.SubtractedCellGetter import SubtractedCellGetter
subtr_gett = SubtractedCellGetter()

######
import PerfMonComps.DomainsRegistry as pdr

pdr.flag_domain('calo')
from CaloRec.CaloRecFlags import jobproperties
from AthenaCommon.Resilience import treatException
from RecExConfig.RecFlags import rec
from AthenaCommon.GlobalFlags import globalflags
from AthenaCommon.DetFlags import DetFlags

jobproperties.CaloRecFlags.doCaloCluster = True
jobproperties.CaloRecFlags.doEmCluster = True
jobproperties.CaloRecFlags.doCaloTopoCluster = True
jobproperties.CaloRecFlags.doCaloEMTopoCluster = True
jobproperties.CaloRecFlags.clusterCellGetterName = 'HIJetRec.SubtractedCellGetter.SubtractedCellGetter'

rec.doEgamma = True
from egammaRec.egammaRecFlags import jobproperties
jobproperties.egammaRecFlags.Enabled = True
jobproperties.egammaRecFlags.cellContainerName = 'SubtractedCells'
jobproperties.egammaRecFlags.doEgammaCaloSeeded = True
jobproperties.egammaRecFlags.doEgammaForwardSeeded = False

if DetFlags.haveRIO.Calo_on():
    #combined clusters
    if jobproperties.CaloRecFlags.doCaloCluster():
        try:
コード例 #3
0
            jobproperties.print_JobProperties('tree&valuenondefault')
        except Exception:
            print "JobProperties tree&value (all): (failed to print only non default)"
            jobproperties.print_JobProperties('tree&value')

    print "\n * * * * * * * * * * * * * * * * *"
    print "ExtSvc:"
    print theApp.ExtSvc

    print "\n * * * * * * * * * * * * * * * * *"
    print "Top algorithms:"
    print theApp.TopAlg

    try:
        import PerfMonComps.DomainsRegistry as pdr
        print "PerfMon domains : ", pdr.domain_names()
        for d in pdr.domain_names():
            print "::: domain [%s]" % d
            algs = pdr.domain_algs(d)
            print "   algs:", algs
    except Exception:
        print "WARNING Could not print PerfMonDomain"

    print "\n * * * * * * * * * * * * * * * * *"
    print "Detector flags:"
    try:
        DetFlags.Print()
    except Exception:
        treatException("Could not print DetFlags!")

    print "\n * * * * * * * * * * * * * * * * *"
コード例 #4
0
from AthenaCommon.Resilience import treatException, protectedInclude

# use to flag domain
import PerfMonComps.DomainsRegistry as pdr

from AODFix.AODFix import *

AODFix_Init()

from CaloRec.CaloRecFlags import jobproperties

#
# functionality : CaloExtensionBuilder setup
# to be used  in tau, pflow, e/gamma
#
pdr.flag_domain('CaloExtensionBuilder')
if (rec.doESD()) and (recAlgs.doEFlow() or rec.doTau()
                      or rec.doEgamma()):  #   or rec.readESD()
    try:
        from TrackToCalo.CaloExtensionBuilderAlgConfig import CaloExtensionBuilder
        CaloExtensionBuilder(
            "NoCut",
            500.)  #Arguments are cutLevel and minPt for track selection
    except Exception:
        treatException("Cannot include CaloExtensionBuilder !")

#
# functionality : electron photon identification
#
#
pdr.flag_domain('egamma')
コード例 #5
0
def _test_main():
    import AthenaCommon.CfgMgr as CfgMgr
    from AthenaCommon.AlgSequence import AlgSequence
    job = AlgSequence()

    import PerfMonComps.DomainsRegistry as pdr
    pdr.flag_domain('core')
    job += CfgMgr.AthSequencer('alg1')
    job += CfgMgr.AthSequencer('alg2')
    job += CfgMgr.AthSequencer('alg3')
    pdr.flag_domain('id')
    job += CfgMgr.AthSequencer('alg4')
    job += CfgMgr.AthSequencer('alg5')

    pdr.flag_domain('empty')

    pdr.flag_domain('muons')
    job += CfgMgr.AthSequencer('alg6')
    job += CfgMgr.AthSequencer('alg7')

    pdr.flag_domain('empty')
    pdr.flag_domain('id')
    job += CfgMgr.AthSequencer('alg4_0')
    job += CfgMgr.AthSequencer('alg5_0')

    pdr.flag_domain('empty')
    pdr.flag_domain('jets')
    job += CfgMgr.AthSequencer('alg8')
    job += CfgMgr.AthSequencer('alg9')

    pdr.flag_domain('empty1')
    pdr.flag_domain('empty2')

    pdr.flag_domain('sub-algs-1')
    job += CfgMgr.AthSequencer('subseq_1')
    job.subseq_1 += CfgMgr.AthSequencer('subseq1_alg1')
    
    pdr.flag_domain('empty3')
    pdr.flag_domain('sub-algs-1')
    job.subseq_1 += CfgMgr.AthSequencer('subseq1_alg2')

    pdr.flag_domain('sub-algs-2')
    job += CfgMgr.AthSequencer('subseq_2')

    pdr.flag_domain('empty3')
    pdr.flag_domain('sub-algs-2')
    job.subseq_2 += CfgMgr.AthSequencer('subseq2_alg1')
    pdr.flag_domain('sub-algs-2')
    job.subseq_2 += CfgMgr.AthSequencer('subseq2_alg2')

    pdr.flag_domain('sub-algs-1')
    job.subseq_1 += CfgMgr.AthSequencer('subseq1_alg3')

    # dummy:
    pdr.set_domain(domain_name='sub-algs-2',
                   alg_name='subseq2_alg2')
    
    ref = {
        'core' : ['alg1','alg2','alg3'],
        'id':    ['alg4','alg5','alg4_0','alg5_0'],
        'muons': ['alg6','alg7'],
        'empty': [],
        'empty1': [],
        'empty2': [],
        'jets': ['alg8','alg9'],
        'sub-algs-1': ['subseq_1'],
        'sub-algs-2': ['subseq_2'],
        }

    print("=== algs:",[c.getName() for c in job.getChildren()])
    print("=== domains:",pdr.domain_names())
    assert sorted(pdr.domain_names()) == \
           sorted(['core', 'id', 'muons',
                   #'empty', 'empty1', 'empty2',
                   'jets',
                   'sub-algs-1',
                   'sub-algs-2',
                   ])
    for d in pdr.domain_names():
        print("::: domain [%s]..." % d)
        #print(" ->",pdr.domain_start(d))
        algs = pdr.domain_algs(d)
        print("    algs:",algs)
        print("    ref: ",ref[d])
        assert algs == ref[d]

    db = pdr.a2d_db()
    db = pdr.d2a_db()
    
    print("OK")
    return 0
コード例 #6
0

# use to flag domain
import PerfMonComps.DomainsRegistry as pdr

from AODFix.AODFix import *
AODFix_Init()


from CaloRec.CaloRecFlags import jobproperties
#
# functionality : electron photon identification
#
#

pdr.flag_domain('egamma')
if rec.doEgamma():
    protectedInclude( "egammaRec/egammaRec_jobOptions.py" )
AODFix_postEgammaRec()


#
# functionality : Muon combined reconstruction
#
pdr.flag_domain('muoncomb')
if rec.doMuonCombined() and DetFlags.Muon_on() and DetFlags.ID_on():
    try:
        include ("MuonCombinedRecExample/MuonCombinedRec_config.py")
    except Exception:
        treatException("Could not set up combined muon reconstruction. Switched off !")
        rec.doMuonCombined = False