예제 #1
0
 def _do_action(self):
     global logMuon
     try:
         self.Loader.load()
     except ImportError, AttributeError:
         from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
         if athenaCommonFlags.AllowIgnoreConfigError():
             logMuonResil.error("Error importing %s. Switching off %s",
                                self.Loader._moduleName, self.__name__)
             self.set_Off()
         else:  # do not allow config error
             raise
예제 #2
0
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
pdr.flag_domain('muon')
if DetFlags.detdescr.Muon_on():
    try:
        from RecExConfig.RecConfFlags import recConfFlags
        from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
        from MuonRecExample.MuonRecFlags import muonRecFlags
        muonRecFlags.applyResilience = athenaCommonFlags.AllowIgnoreConfigError(
        )
    except Exception:
        treatException("Could not set muonRecFlags.applyResilience")

# hack the merged jobo should test on rec.ScopingLevel=5 to run cosmic reco
#    4 the essential collision reco 3 high priority 2 medium priodity 1 nice to have

    try:
        include("MuonRecExample/MuonRec_jobOptions.py")
    except Exception:
        treatException(
            "Problem with MuonRecExample/MuonRec_jobOptions.py. Switching off Moore and Muonboy"
        )
        from MuonRecExample.MuonRecFlags import muonRecFlags
        muonRecFlags.doStandalone = False
예제 #3
0
if 'SkipEvents' in dir():
    athenaCommonFlags.SkipEvents = SkipEvents
    del SkipEvents

# Overwrite Geometry tag
if 'DetDescrVersion' in dir():
    globalflags.DetDescrVersion = DetDescrVersion
    del DetDescrVersion

#--------------------------------------------------------------
# no perfmon if VP1
## if muonRecFlags.doVP1():
##     recFlags.doPerfMon = False

# synchronise some flags
recConfFlags.AllowIgnoreConfigError = athenaCommonFlags.AllowIgnoreConfigError(
)

# event selection. EventList contains the name of the file with one event number per line
if 'EventList' in dir():
    include("MuonRecExample/SelectEvents_jobOptions.py")

# main jobOption
include("RecExCommon/RecExCommon_topOptions.py")

# avoid the need for a PoolFileCatalog
ServiceMgr.PoolSvc.AttemptCatalogPatch = True

try:
    del topSequence.Stream2Filter
    logMuon.info("Removing Stream2Filter from topSequence")
except AttributeError:
예제 #4
0
    def setDefaults(self):
        global globalflags

        from MuonRecExample.MuonRecUtils import setJobPropertyDefault as setDefault

        # as long as rec.Commissioning is alive, sync the default to it
        # in case of BS->RDO, RDO->RDO, RDO->BS, BS->BS: don't run RIO (i.e RDO->PRD)
        setDefault(self.makePRDs, rec.readRDO() and not rec.doWriteRDO() and not rec.doWriteBS())
        setDefault(self.doStandalone,True)
        setDefault(self.doDigitization,False)
        setDefault(self.doCalib,False)
        setDefault(self.applyResilience,athenaCommonFlags.AllowIgnoreConfigError())
        setDefault(self.doSegmentsOnly,False)
        setDefault(self.doMDTs,True)
        setDefault(self.doRPCs,True)
        setDefault(self.doTGCs,True)
        setDefault(self.doCSCs,True)
        setDefault(self.dosTGCs,True)
        setDefault(self.doMicromegas,True)
        setDefault(self.doMSVertex,True)
        setDefault(self.useWireSagCorrections,False)
        setDefault(self.enableErrorTuning,True)
        setDefault(self.useLooseErrorTuning,False)
        setDefault(self.useAlignmentCorrections,DetFlags.detdescr.Muon_on() and rec.doMuon())
        setDefault(self.writeSDOs, rec.doWriteESD() and globalflags.DataSource != 'data')
        setDefault(self.useTGCPriorNextBC,True)
        setDefault(self.doMuonIso,True)

        if beamFlags.beamType == 'cosmics' or beamFlags.beamType == 'singlebeam':
            setDefault(self.doSegmentT0Fit,True)
        else:
            setDefault(self.doSegmentT0Fit,False)
            
        setDefault(self.doPrdSelect,False)

        # Default for MuonCalibration ntuple
        setDefault(self.calibMuonStandalone, muonRecFlags.doStandalone() or rec.readESD() )
        try:
            from MuonCnvExample.MuonCalibFlags import muonCalibFlags
        except ImportError:
            from AthenaCommon.Resilience import treatException
            treatException("Could not load MuonCalibFlags. Switching off calibration ntuple")
            self.doCalib = False
            self.doCalibNtuple = False
        else:
               
            doTracks = self.calibMuonStandalone()
            # chose a default
            if not muonCalibFlags.Mode.statusOn:
                if doTracks:
                    muonCalibFlags.Mode = 'trackNtuple'
                else:
                    muonCalibFlags.Mode = 'ntuple'

            if muonCalibFlags.Mode == 'trackNtuple' and doTracks:
                setDefault(self.doCalibNtuple,self.doCalib())
                setDefault(self.calibNtupleSegments,True)
                setDefault(self.calibNtupleTracks,True)
                if rec.doTrigger: setDefault(self.calibNtupleTrigger,True)
                else: setDefault(self.calibNtupleTrigger,False)
            elif muonCalibFlags.Mode == 'ntuple' or (muonCalibFlags.Mode == 'trackNtuple' and not doTracks):
                setDefault(self.doCalibNtuple,self.doCalib())
                setDefault(self.calibNtupleSegments,True)
                setDefault(self.calibNtupleTracks,False)
                if rec.doTrigger: setDefault(self.calibNtupleTrigger,True)
                else: setDefault(self.calibNtupleTrigger,False)
            else:
                setDefault(self.doCalibNtuple,False)
                setDefault(self.calibNtupleSegments,False)
                setDefault(self.calibNtupleTracks,False)
                setDefault(self.calibNtupleTrigger,False)