Ejemplo n.º 1
0
        # Override global conditions tag from command line
        if ('vp1GlobCond' in dir()):
            from IOVDbSvc.CondDB import conddb
            conddb.setGlobalTag(vp1GlobCond)

if vp1FilterEvents:
    import DumpGeo.VP1EvtFilter
    vp1FilterEvents = DumpGeo.VP1EvtFilter.parseFilterString(vp1FilterEvents)
    DumpGeo.VP1EvtFilter.installEventFilter(vp1FilterEvents)

from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()

#Detector setup:
from AthenaCommon.DetFlags import DetFlags
if (vp1ID): DetFlags.ID_setOn()
else: DetFlags.ID_setOff()
if (vp1Calo): DetFlags.Calo_setOn()
else: DetFlags.Calo_setOff()
if (vp1Muon): DetFlags.Muon_setOn()
else: DetFlags.Muon_setOff()
if (vp1LUCID): DetFlags.Lucid_setOn()
else: DetFlags.Lucid_setOff()
if (vp1ALFA): DetFlags.ALFA_setOn()
else: DetFlags.ALFA_setOff()
if (vp1ForwardRegion): DetFlags.FwdRegion_setOn()
else: DetFlags.FwdRegion_setOff()
if (vp1ZDC): DetFlags.ZDC_setOn()
else: DetFlags.ZDC_setOff()
DetFlags.Print()
if (vp1CustomGeometry):
# --- set geometry version
globalflags.DetDescrVersion = DetDescrVersion
# --- printout
globalflags.print_JobProperties()

from AthenaCommon.BeamFlags import jobproperties
# --- default is zero luminosity
#jobproperties.Beam.numberOfCollisions = 0.0

#--------------------------------------------------------------
# Set Detector setup
#--------------------------------------------------------------

from AthenaCommon.DetFlags import DetFlags 
# --- switch on InnerDetector
DetFlags.ID_setOn()
# --- and switch off all the rest
DetFlags.Calo_setOff()
DetFlags.Muon_setOff()
# ---- switch parts of ID off/on as follows
#DetFlags.pixel_setOff()
#DetFlags.SCT_setOff()
#DetFlags.TRT_setOff()
# --- printout
DetFlags.Print()

#--------------------------------------------------------------
# Load InDet configuration
#--------------------------------------------------------------

# --- setup InDetJobProperties
Ejemplo n.º 3
0
    def configureReco(self):

        from AthenaCommon.DetFlags import DetFlags
        DetFlags.Muon_setOn()
        DetFlags.ID_setOn()

        #==============================================================
        # Job Configuration parameters:
        #==============================================================
        # Signal to include file that this is not the postOptions,
        # in case the jobConfig is also the postOptions
        isPostOptions = False

        #--- Configuration part: ---------------------------------------
        doRestrictedESD = recConfig.restrictedESD
        doMinimalRec = recConfig.doMinimalRec
        doBackTracking = recConfig.doBackTracking

        indetRecos = ('xKalman', 'iPatRec', 'newTracking')
        doAODall = False  # TODO: = recConfig.<something>
        # set all known flags to False
        for reco in indetRecos:
            exec 'do%s = False' % reco

        #
        # set requested flags to True
        #
        recosOn = []
        recosAll = list(indetRecos)
        if 'all' in recConfig.doIndetReco:
            # add all known indet recos
            for reco in indetRecos:
                recosOn.append(reco)

        # add all requested recos (avoid doubles)
        for reco in recConfig.doIndetReco:
            if reco != 'all':
                if reco not in recosOn: recosOn.append(reco)
                if reco not in recosAll: recosAll.append(reco)
        for reco in recosOn:
            exec 'do%s = True' % reco

        # Determine doAODall flag
        doAODall = True
        for reco in indetRecos:
            if reco not in recosOn:
                doAODall = False
                break

        # Switch off some parts of combined reco
        if 'doObjMissingET' in recConfig.combinedRecoOff:
            doObjMissingET = False

        include("RecExCond/RecExCommon_flags.py")

        # Switch off sub-detectors
        for detOff in recConfig.detectorsOff:
            cmd = 'DetFlags.%s_setOff()' % detOff
            try:
                exec cmd
                recoLog.info(cmd)
            except AttributeError:
                recoLog.error("Can not switch off detector %s", detOff)
                raise

        if 'InDetFlags' in dir():
            InDetFlags.usePrimVertexZcoordinate(
                recConfig.usePrimVertexZcoordinate)
            InDetFlags.doSlimming = recConfig.enableTrackSlimming

        #--------------------------------------------------------------
        # Do the job!
        #--------------------------------------------------------------
        include("RecExCommon/RecExCommon_topOptions.py")

        #
        # Include user options
        #
        if recConfig.postOptionsESD:
            # Signal to include file that this is the postOptions,
            # in case the jobConfig is also the postOptions
            isPostOptions = True
            include(recConfig.postOptionsESD)