def AppendOutputList(HIAODItemList=[]): """Adds HIJetOutputList to the list passed in as an argument""" if HIJetFlags.WriteClusters(): AddToOutputList(HIJetFlags.HIClusterKey(), "xAOD::CaloClusterContainer") from RecExConfig.RecFlags import rec if not rec.doESD(): for R in HIJetFlags.AntiKtRValues(): AddToOutputList("AntiKt%dHIJets" % int(10 * R)) if jetFlags.useTruth(): AddToOutputList("AntiKt%dTruthJets" % int(10 * R)) AddToOutputList(HIJetFlags.TrackJetContainerName()) HIAODItemList += HIJetFlags.HIJetOutputList()
def retrieveAODList(): from JetRec.JetRecFlags import jetFlags from RecExConfig.RecFlags import rec if rec.doESD(): return jetFlags.jetAODList() # else : just copy what's in input. from RecExConfig.ObjKeyStore import objKeyStore inputcontent = objKeyStore['inputFile'].list() esdjets = [o for o in inputcontent if 'xAOD::JetContainer_v1' in o ] esdjets += [o for o in inputcontent if 'xAOD::JetAuxContainer_v1' in o ] esdjets += [o for o in inputcontent if 'xAOD::JetTrigAuxContainer_v1' in o ] return esdjets
def retrieveAODList(): from JetRec.JetRecFlags import jetFlags from RecExConfig.RecFlags import rec if rec.doESD(): return jetFlags.jetAODList() # then we are merging or doing a AOD ? # We can not simply copy what we have from input since some # jobs starts from empty files. See ATEAM-191. # We hard code the list here while waiting for a more robust solution l = [ # event shape objects 'xAOD::EventShape#Kt4EMPFlowEventShape', 'xAOD::EventShapeAuxInfo#Kt4EMPFlowEventShapeAux.', 'xAOD::EventShape#Kt4EMTopoEventShape', 'xAOD::EventShapeAuxInfo#Kt4EMTopoEventShapeAux.', 'xAOD::EventShape#Kt4LCTopoEventShape', 'xAOD::EventShapeAuxInfo#Kt4LCTopoEventShapeAux.', 'xAOD::EventShape#NeutralParticleFlowIsoCentralEventShape', 'xAOD::EventShapeAuxInfo#NeutralParticleFlowIsoCentralEventShapeAux.', 'xAOD::EventShape#NeutralParticleFlowIsoForwardEventShape', 'xAOD::EventShapeAuxInfo#NeutralParticleFlowIsoForwardEventShapeAux.', 'xAOD::EventShape#ParticleFlowIsoCentralEventShape', 'xAOD::EventShapeAuxInfo#ParticleFlowIsoCentralEventShapeAux.', 'xAOD::EventShape#ParticleFlowIsoForwardEventShape', 'xAOD::EventShapeAuxInfo#ParticleFlowIsoForwardEventShapeAux.', 'xAOD::EventShape#TopoClusterIsoCentralEventShape', 'xAOD::EventShapeAuxInfo#TopoClusterIsoCentralEventShapeAux.', 'xAOD::EventShape#TopoClusterIsoForwardEventShape', 'xAOD::EventShapeAuxInfo#TopoClusterIsoForwardEventShapeAux.', 'xAOD::JetContainer#AntiKt10LCTopoJets', 'xAOD::JetAuxContainer#AntiKt10LCTopoJetsAux.', 'xAOD::JetContainer#AntiKt2PV0TrackJets', 'xAOD::JetAuxContainer#AntiKt2PV0TrackJetsAux.', 'xAOD::JetContainer#AntiKt3PV0TrackJets', 'xAOD::JetAuxContainer#AntiKt3PV0TrackJetsAux.', 'xAOD::JetContainer#AntiKt4EMPFlowJets', 'xAOD::JetAuxContainer#AntiKt4EMPFlowJetsAux.', 'xAOD::JetContainer#AntiKt4EMTopoJets', 'xAOD::JetAuxContainer#AntiKt4EMTopoJetsAux.', 'xAOD::JetContainer#AntiKt4LCTopoJets', 'xAOD::JetAuxContainer#AntiKt4LCTopoJetsAux.', 'xAOD::JetContainer#AntiKt4PV0TrackJets', 'xAOD::JetAuxContainer#AntiKt4PV0TrackJetsAux.', 'xAOD::JetContainer#CamKt12LCTopoJets', 'xAOD::JetAuxContainer#CamKt12LCTopoJetsAux.', 'xAOD::CaloClusterContainer#EMOriginTopoClusters', 'xAOD::ShallowAuxContainer#EMOriginTopoClustersAux.', 'xAOD::CaloClusterContainer#LCOriginTopoClusters' , 'xAOD::ShallowAuxContainer#LCOriginTopoClustersAux.', ] if rec.doTruth(): l += [ 'xAOD::JetContainer#AntiKt10TruthJets', 'xAOD::JetAuxContainer#AntiKt10TruthJetsAux.', 'xAOD::JetContainer#AntiKt10TruthWZJets', 'xAOD::JetAuxContainer#AntiKt10TruthWZJetsAux.', 'xAOD::JetContainer#AntiKt4TruthJets', 'xAOD::JetAuxContainer#AntiKt4TruthJetsAux.', 'xAOD::JetContainer#AntiKt4TruthWZJets', 'xAOD::JetAuxContainer#AntiKt4TruthWZJetsAux.', 'xAOD::JetContainer#CamKt12TruthJets', 'xAOD::JetAuxContainer#CamKt12TruthJetsAux.', 'xAOD::JetContainer#CamKt12TruthWZJets', 'xAOD::JetAuxContainer#CamKt12TruthWZJetsAux.', ] return l
def configure(self): # from AthenaServices.AthenaServicesConf import AthenaOutputStream # from AthenaCommon.AppMgr import ServiceMgr # from AthenaCommon.AlgSequence import AlgSequence # topSequence = AlgSequence() # ### the following was gotten from the LVL1TriggerGetter not sure if needed when not simulation # if not (TriggerFlags.fakeLVL1() or TriggerFlags.doLVL1()): # DetFlags.readRIOPool.LVL1_setOn() # # ***Temp : needed to enable required combination of thresholds # # mu4,mu6,mu10,mu11,mu20,mu40 # # Will be replaced by config. from Lvl1ConfigSvc # if hasattr(ServiceMgr,'RPCcablingSimSvc'): # ServiceMgr.RPCcablingSimSvc.HackFor1031 = True if jobproperties.Global.InputFormat() == 'bytestream': theApp.Dlls += ["TrigT1Calo"] include("TrigT1CaloByteStream/ReadLVL1CaloBS_jobOptions.py") # ### from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() if recAlgs.doTrigger(): if (rec.doESD() or rec.doAOD()) and (not(rec.readAOD() or \ rec.readESD())): if jobproperties.Global.InputFormat() == 'bytestream': # Decode ROIB::RoIBResult from ByteStream from TrigT1ResultByteStream.TrigT1ResultByteStreamConfig import L1ByteStreamDecodersRecExSetup L1ByteStreamDecodersRecExSetup() from AnalysisTriggerAlgs.AnalysisTriggerAlgsConfig import \ RoIBResultToAOD topSequence += RoIBResultToAOD("RoIBResultToxAOD") pass pass from TrigEDMConfig.TriggerEDM import getLvl1ESDList objKeyStore.addManyTypesStreamESD(getLvl1ESDList()) from TrigEDMConfig.TriggerEDM import getLvl1AODList objKeyStore.addManyTypesStreamAOD(getLvl1AODList()) return True
def _AddOPIToESD(self): log = logging.getLogger("HLTTriggerResultGetter.py") if rec.doESD(): from RecExConfig.InputFilePeeker import inputFileSummary if inputFileSummary.has_key('bs_metadata') and inputFileSummary['bs_metadata'].has_key('Stream'): stream=inputFileSummary['bs_metadata']['Stream'] log.debug("the stream found in 'bs_metadata' is "+stream) if "express" in stream: from TrigEDMConfig.TriggerEDM import getTypeAndKey,EDMDetails type,key=getTypeAndKey("TrigOperationalInfo#HLT_EXPRESS_OPI_HLT") if EDMDetails[type].has_key('collection'): colltype = EDMDetails[type]['collection'] log.info("Adding HLT_EXPRESS_OPI_HLT to ESD for stream "+stream) from RecExConfig.ObjKeyStore import objKeyStore objKeyStore.addStreamESD(colltype, key) return True else: log.warning("Could not determine stream of bytestream file, not adding HLT_EXPRESS_OPI_HLT to ESD.") return False
def retrieveAODList(): from JetRec.JetRecFlags import jetFlags from RecExConfig.RecFlags import rec if rec.doESD(): return jetFlags.jetAODList() # else : just copy what's in input. from RecExConfig.ObjKeyStore import objKeyStore inputcontent = objKeyStore['inputFile'].list() typeToSave = [ 'xAOD::JetContainer', 'xAOD::JetAuxContainer', 'xAOD::JetTrigAuxContainer' , 'xAOD::EventShape', 'xAOD::EventShapeAuxInfo' ] def saveThisObject(o): # we must not write out any HLT jet containers - writing of those is controlled from trigger software, not offline jet software if "HLT_" in o: return False # return True if o is of a desired type return any( o.startswith( typ ) for typ in typeToSave ) esdjets = [ o for o in inputcontent if saveThisObject(o) ] return esdjets
# # 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 # # functionality : add cells crossed by high pt ID tracks # if rec.doESD() and recAlgs.doTrackParticleCellAssociation(): from AthenaCommon.CfgGetter import getPublicTool getPublicTool("MuonCombinedInDetDetailedTrackSelectorTool") topSequence += CfgMgr.TrackParticleCellAssociationAlg("TrackParticleCellAssociationAlg") # # functionality : energy flow # pdr.flag_domain('eflow') if recAlgs.doEFlow() and ( rec.readESD() or ( DetFlags.haveRIO.ID_on() and DetFlags.haveRIO.Calo_allOn() ) ) : try: include( "eflowRec/eflowRec_jobOptions.py" ) except Exception: treatException("Could not set up EFlow. Switched off !") recAlgs.doEFlow=False else:
def configure(self): # Don't do anything for data jobs: from AthenaCommon.GlobalFlags import globalflags if globalflags.DataSource() == "data": return True # Also check that this is not a reconstruction job, as the # slimming could mess up such a job very badly. from RecExConfig.RecFlags import rec if rec.doESD() or rec.doAOD(): return True # Let the user know what we're doing: __log = logging.getLogger("TrigNavSlimming") __log.info("Configuring Trigger Navigation Slimming") # Construct the object/container names for which the navigation # should have references: from TrigEDMConfig.TriggerEDM import getTriggerObjList, TriggerL2List, TriggerEFList, TriggerHLTList, TriggerResultsList tlist = getTriggerObjList( 'AODFULL', [TriggerL2List, TriggerEFList, TriggerHLTList, TriggerResultsList]) from RecExConfig.ObjKeyStore import cfgKeyStore objlist = [] for t, kset in tlist.iteritems(): for k in kset: __log.debug("Checking for object %s#%s" % (t, k)) # Notice that we can't use the isInInput(...) function. # Calling getAODList(...) earlier adds all the trigger # objects to be available in the transient store. Even # though they won't be. This is why we can't use this # singleton in a reconstruction job. if cfgKeyStore.isInInputFile(t, k): objlist += ["%s#%s" % (t, k)] pass pass pass __log.info("Will retain references for objects: %s" % objlist) actions = ['SyncThinning', 'Reload'] if objlist: actions.append('DropFeatures') # Set up the slimming algorithm: from TrigNavTools.TrigNavToolsConf import HLT__TrigNavigationSlimming, TrigNavigationThinningTool, HLT__TrigNavigationSlimmingTool from AthenaServices.AthenaServicesConf import ThinningSvc from AthenaCommon.AppMgr import ToolSvc, ServiceMgr thinningSvc = ThinningSvc() ServiceMgr += thinningSvc navSlimmingTool = HLT__TrigNavigationSlimmingTool() navSlimmingTool.Actions = actions navSlimmingTool.ThinningSvc = thinningSvc navSlimmingTool.FeatureInclusionList = objlist navThinningTool = TrigNavigationThinningTool() navThinningTool.ActInPlace = True navThinningTool.SlimmingTool = navSlimmingTool navThinningTool.ThinningSvc = thinningSvc ToolSvc += navThinningTool slimmer = HLT__TrigNavigationSlimming() slimmer.ThinningTool = navThinningTool self.__sequence += slimmer # Signal that everything went okay: return True
def ConfigureInputType(): from PyUtils.MetaReaderPeeker import metadata from AthenaCommon.GlobalFlags import globalflags streamsName = [] if metadata['file_type'] == 'BS': #byte stream logAutoConfiguration.info("Input BS detected") globalflags.InputFormat = 'bytestream' rec.readRDO = True rec.readESD = False rec.readAOD = False rec.doAOD = False rec.doESD = True rec.doWriteAOD = False logAutoConfiguration.info( "BS format: setting globalflags.InputFormat=%s " % globalflags.InputFormat()) logAutoConfiguration.info("BS format: setting rec.readRDO=%s " % rec.readRDO()) logAutoConfiguration.info("BS format: setting rec.doAOD=%s " % rec.doAOD()) logAutoConfiguration.info("BS format: setting rec.doESD=%s " % rec.doESD()) logAutoConfiguration.info("BS format: setting rec.doWriteAOD=%s " % rec.doWriteAOD()) else: globalflags.InputFormat = 'pool' #Get streamsName streamsName = [] if 'processingTags' in metadata: streamsName = metadata['processingTags'] if streamsName == None: streamsName = [] logAutoConfiguration.info("Extracted streams %s from input file " % streamsName) if len(streamsName) == 0: logAutoConfiguration.warning( "ConfigureInputType: no stream in input file.") elif len(streamsName) > 1: logAutoConfiguration.warning( "ConfigureInputType: more than one stream: %s in input file. Default action. Consider the highest one." ) else: rec.mergingStreamName = streamsName[0] from RecExConfig.RecoFunctions import OverlapLists try: from PrimaryDPDMaker.PrimaryDPDFlags import listRAWtoDPD, listESDtoDPD, listAODtoDPD except: logAutoConfiguration.warning( "Unable to import PrimaryDPDFlags. OK for ATN tests below AtlasAnalysis, otherwise suspicious." ) listRAWtoDPD = [] listESDtoDPD = [] listAODtoDPD = [] ## these lines have been added to guarantee the backward compatibility for the old DPD naming convention cosmics try: from PrimaryDPDMaker.PrimaryDPDFlags import listBackwardCompatibleAODtoDPD, listBackwardCompatibleESDtoDPD listESDtoDPD.extend(listBackwardCompatibleESDtoDPD) listAODtoDPD.extend(listBackwardCompatibleAODtoDPD) except: logAutoConfiguration.warning( "Primary DPDMake does not support the old naming convention!!") if 'TagStreamsRef' in metadata and metadata['TagStreamsRef'] != None: logAutoConfiguration.info("Input TAG detected") rec.readTAG = True logAutoConfiguration.info("Auto configured rec.readTAG=%s " % rec.readTAG()) from RecExConfig.RecoFunctions import ItemInListStartsWith if ItemInListStartsWith("StreamAOD", streamsName) or ItemInListStartsWith( 'StreamDAOD', streamsName) or ItemInListStartsWith( 'StreamD2AOD', streamsName) or OverlapLists( streamsName, listAODtoDPD) or ItemInListStartsWith( 'DAOD', streamsName) or ItemInListStartsWith( 'D2AOD', streamsName): logAutoConfiguration.info("Input AOD detected") rec.readRDO = False rec.readESD = False rec.readAOD = True rec.doAOD = False rec.doESD = False logAutoConfiguration.info("setting rec.readAOD=%s " % rec.readAOD()) elif ItemInListStartsWith( "StreamESD", streamsName) or ItemInListStartsWith( 'StreamDESD', streamsName) or ItemInListStartsWith( 'StreamD2ESD', streamsName) or OverlapLists( streamsName, listESDtoDPD) or ItemInListStartsWith( 'DESD', streamsName) or ItemInListStartsWith( 'D2ESD', streamsName): logAutoConfiguration.info("Input ESD detected") rec.readRDO = False rec.readESD = True rec.readAOD = False rec.doAOD = True rec.doESD = False logAutoConfiguration.info("setting rec.readESD=%s " % rec.readESD()) logAutoConfiguration.info("setting rec.doAOD=%s " % rec.doAOD()) elif ItemInListStartsWith("Stream1", streamsName) or ItemInListStartsWith( "StreamRDO", streamsName) or ItemInListStartsWith( "OutputStreamRDO", streamsName) or OverlapLists( streamsName, listRAWtoDPD): logAutoConfiguration.info("Input RDO detected") rec.readRDO = True rec.readESD = False rec.readAOD = False rec.doAOD = False rec.doESD = True logAutoConfiguration.info("setting rec.readRDO=%s " % rec.readRDO()) logAutoConfiguration.info("setting rec.doESD=%s " % rec.doESD()) elif ItemInListStartsWith("StreamEVGEN", streamsName): logAutoConfiguration.info("Input EVGEN detected") rec.readRDO = False rec.readESD = False rec.readAOD = False rec.doAOD = False rec.doESD = False logAutoConfiguration.info( "setting all unlocked rec.readXXX and rec.doXXX to False") elif ItemInListStartsWith("StreamHITS", streamsName): logAutoConfiguration.info("Input StreamEVGEN detected") elif metadata['file_type'] != 'BS': raise RuntimeError("ConfigureInputType cannot handle streamsName==%s" % streamsName) return
"/LAR/BadChannels/BadChannels", "/LAR/BadChannelsOfl/BadChannels" + forceRN + rekeyBC, className="CondAttrListCollection") from LArBadChannelTool.LArBadChannelToolConf import LArBadChannelCondAlg condSeq += LArBadChannelCondAlg(ReadKey="/LAR/BadChannels/BadChannels") conddb.addFolderSplitOnline("LAR", "/LAR/BadChannels/MissingFEBs", "/LAR/BadChannelsOfl/MissingFEBs" + forceRN + rekeyMF, className='AthenaAttributeList') from LArBadChannelTool.LArBadChannelToolConf import LArBadFebCondAlg condSeq += LArBadFebCondAlg(ReadKey="/LAR/BadChannels/MissingFEBs") if (rec.doESD() or rec.doRDOTrigger()): if 'COMP200' not in conddb.GetInstance(): rekeyBADF = "<key>/LAR/BadChannels/KnownBADFEBs</key>" rekeyMNBF = "<key>/LAR/BadChannels/KnownMNBFEBs</key>" conddb.addFolderSplitOnline( "LAR", "/LAR/BadChannels/KnownBADFEBs", "/LAR/BadChannelsOfl/KnownBADFEBs" + forceRN + rekeyBADF, False, False, False, "AthenaAttributeList") inkeyBad = "/LAR/BadChannels/KnownBADFEBs" conddb.addFolderSplitOnline( "LAR", "/LAR/BadChannels/KnownMNBFEBs", "/LAR/BadChannelsOfl/KnownMNBFEBs" + forceRN + rekeyMNBF, False, False, False, "AthenaAttributeList") inkeyMNB = "/LAR/BadChannels/KnownMNBFEBs" else: inkeyBad = ""
def configure(self): log = logging.getLogger("HLTTriggerResultGetter.py") from RecExConfig.ObjKeyStore import objKeyStore # set EDMDecodingVersion EDMDecodingVersion() # Set AODFULL for data unless it was set explicitly already if TriggerFlags.AODEDMSet.isDefault() and globalflags.DataSource()=='data': TriggerFlags.AODEDMSet = 'AODFULL' from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() log.info("BS unpacking (TF.readBS): %d" % TriggerFlags.readBS() ) if TriggerFlags.readBS(): bs = ByteStreamUnpackGetter() xAODContainers = {} # if not recAlgs.doTrigger(): #only convert when running on old data if TriggerFlags.EDMDecodingVersion()==1: xaodcnvrt = xAODConversionGetter() xAODContainers = xaodcnvrt.xaodlist if recAlgs.doTrigger() or TriggerFlags.doTriggerConfigOnly(): tdt = TrigDecisionGetter() # TrigJetRec additions if rec.doWriteESD(): objKeyStore.addStreamESD("JetKeyDescriptor","JetKeyMap") objKeyStore.addStreamESD("JetMomentMap","TrigJetRecMomentMap") if rec.doWriteAOD(): objKeyStore.addStreamAOD("JetKeyDescriptor","JetKeyMap") objKeyStore.addStreamAOD("JetMomentMap","TrigJetRecMomentMap") # ID truth if not rec.readESD() and (not rec.readAOD()) and TriggerFlags.doID() \ and rec.doTruth(): try: from TrigInDetTruthAlgs.TrigInDetTruthAlgsConfig import \ TrigIDTruthMaker topSequence += TrigIDTruthMaker() except Exception: log.warning( "Couldn't set up the trigger ID truth maker" ) pass if rec.doESD() or rec.doAOD(): from TrigEDMConfig.TriggerEDM import getTrigIDTruthList objKeyStore.addManyTypesStreamESD(getTrigIDTruthList(TriggerFlags.ESDEDMSet())) objKeyStore.addManyTypesStreamAOD(getTrigIDTruthList(TriggerFlags.AODEDMSet())) if (rec.doESD() or rec.doAOD()) and TriggerFlags.writeL1TopoValData(): objKeyStore.addManyTypesStreamESD(['xAOD::TrigCompositeContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValData', 'xAOD::TrigCompositeAuxContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValDataAux.']) objKeyStore.addManyTypesStreamAOD(['xAOD::TrigCompositeContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValData', 'xAOD::TrigCompositeAuxContainer#HLT_xAOD__TrigCompositeContainer_L1TopoValDataAux.']) log.debug("HLT_xAOD__TrigCompositeContainer_L1TopoValData(Aux.) for L1Topo validation added to the data.") if rec.doAOD() or rec.doWriteAOD(): # schedule the RoiDescriptorStore conversion # log.warning( "HLTTriggerResultGetter - setting up RoiWriter" ) topSequence += RoiWriter() # write out the RoiDescriptorStores from TrigEDMConfig.TriggerEDM import TriggerRoiList objKeyStore.addManyTypesStreamAOD( TriggerRoiList ) #Are we adding operational info objects in ESD? added=self._AddOPIToESD() if added: log.debug("Operational Info object HLT_EXPRESS_OPI_HLT with extra information about express stream prescaling added to the data.") # ESD objects definitions _TriggerESDList = {} from TrigEDMConfig.TriggerEDM import getTriggerEDMList # we have to store xAOD containers in the root file, NOT AOD, # if the xAOD container list is not empty if(xAODContainers): _TriggerESDList.update( xAODContainers ) else: _TriggerESDList.update( getTriggerEDMList(TriggerFlags.ESDEDMSet(), TriggerFlags.EDMDecodingVersion()) ) log.info("ESD content set according to the ESDEDMSet flag: %s and EDM version %d" % (TriggerFlags.ESDEDMSet() ,TriggerFlags.EDMDecodingVersion()) ) # AOD objects choice _TriggerAODList = {} #from TrigEDMConfig.TriggerEDM import getAODList _TriggerAODList.update( getTriggerEDMList(TriggerFlags.AODEDMSet(), TriggerFlags.EDMDecodingVersion()) ) log.info("AOD content set according to the AODEDMSet flag: %s and EDM version %d" % (TriggerFlags.AODEDMSet(),TriggerFlags.EDMDecodingVersion()) ) log.debug("ESD EDM list: %s", _TriggerESDList) log.debug("AOD EDM list: %s", _TriggerAODList) # Highlight what is in AOD list but not in ESD list, as this can cause # the "different number of entries in branch" problem, when it is in the # AOD list but the empty container per event is not created # Just compares keys of dicts, which are the class names, not their string keys in StoreGate not_in = [ element for element in _TriggerAODList if element not in _TriggerESDList ] if (len(not_in)>0): log.warning("In AOD list but not in ESD list: ") log.warning(not_in) else: log.info("AOD list is subset of ESD list - good.") def _addSlimming(stream, thinningSvc, edm): from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from TrigNavTools.TrigNavToolsConf import HLT__StreamTrigNavSlimming, HLT__TrigNavigationSlimming from TrigNavTools.TrigNavToolsConfig import navigationSlimming edmlist = list(y.split('-')[0] for x in edm.values() for y in x) #flatten names # from HLT result drop unrecorded features # slimmerHLT = HLT__StreamTrigNavSlimming('HLTNavSlimmer_%s'%stream) slimmerHLT = HLT__TrigNavigationSlimming('TrigNavigationSlimmer_%s'%stream) tHLT = navigationSlimming({'name':'HLTNav_%s'%stream, 'mode':'cleanup', 'ThinningSvc':thinningSvc, 'result':'HLTResult_HLT', 'features':edmlist}) #tHLT.SlimmingTool.OutputLevel=DEBUG tHLT.ActInPlace=True slimmerHLT.ThinningTool = tHLT print slimmerHLT.ThinningTool topSequence += slimmerHLT log.info("Configured slimming of HLT") del edmlist from AthenaCommon.AppMgr import ServiceMgr as svcMgr from AthenaServices.Configurables import ThinningSvc, createThinningSvc _doSlimming = True if _doSlimming and rec.readRDO() and rec.doWriteAOD(): if not hasattr(svcMgr, 'ThinningSvc'): # if the default is there it is configured for AODs svcMgr += ThinningSvc(name='ThinningSvc', Streams=['StreamAOD']) _addSlimming('StreamAOD', svcMgr.ThinningSvc, _TriggerESDList ) #Use ESD item list also for AOD! log.info("configured navigation slimming for AOD output") if _doSlimming and rec.readRDO() and rec.doWriteESD(): #rec.doWriteESD() and not rec.readESD(): if not hasattr(svcMgr, 'ESDThinningSvc'): svcMgr += ThinningSvc(name='ESDThinningSvc', Streams=['StreamESD']) # the default is configured for AODs _addSlimming('StreamESD', svcMgr.ESDThinningSvc, _TriggerESDList ) log.info("configured navigation slimming for ESD output") objKeyStore.addManyTypesStreamESD( _TriggerESDList ) objKeyStore.addManyTypesStreamAOD( _TriggerAODList ) return True
include("ForwardRec/LUCID_Rec_jobOptions.py") #if (rec.doForwardDet and rec.doZdc): # include ( "ZdcRec/ZdcRec_jobOptions.py" ) if DetFlags.makeRIO.ZDC_on() and not rec.doWriteBS(): try: #from ZdcRec.ZdcRawChannelGetter import ZdcRawChannelGetter #ZdcRawChannelGetter() from ZdcRec.ZdcModuleGetter import ZdcModuleGetter ZdcModuleGetter() except Exception: treatException("Problem with ZdcModuleGetter. Switched off.") DetFlags.makeRIO.ZDC_setOff() if rec.doAlfa() and rec.doESD(): if DetFlags.readRDOBS.ALFA_on(): #Needed for real-data reconstruction: from ALFA_RawDataByteStreamCnv.ALFA_RawDataByteStreamCnvConf import ALFA_RawDataProvider topSequence += ALFA_RawDataProvider() from ALFA_Raw2Digit.ALFA_Raw2DigitConf import ALFA_Raw2Digit topSequence += ALFA_Raw2Digit(MeasuredDataType="tunnel") pass #For both, real and simulated data: #from IOVDbSvc.CondDB import conddb #conddb.addFolder("FWD","/FWD/ALFA/position_calibration<tag>FWDALFAposition_calibration-run373-v2</tag>") include("ALFA_LocRec/ALFA_LocRec_joboption.py")
from RecExConfig.RecFlags import rec from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() from CaloRingerAlgs.CaloRingerFlags import caloRingerFlags from CaloRingerAlgs.CaloRingerKeys import CaloRingerKeysDict # Get CaloRinger algorithm handles from CaloRingerAlgs.CaloRingerAlgorithmBuilder import CaloRingerAlgorithmBuilder CRAlgBuilder = CaloRingerAlgorithmBuilder() from CaloRingerAlgs.CaloRingerMetaDataBuilder import CaloRingerMetaDataBuilder CRMetaDataBuilder = CaloRingerMetaDataBuilder(disable=True) if rec.doESD() and caloRingerFlags.buildCaloRingsOn() and CRAlgBuilder.usable( ): LastCRWriter = CRMetaDataBuilder.getLastWriterHandle() CRMainAlg = CRAlgBuilder.getCaloRingerAlgHandle() CRMetaDataWriterAlg = CRMetaDataBuilder.getMetaDataWriterHandle() try: # FIXME: It seems that the python implementation takes a lot of memory # (https://its.cern.ch/jira/browse/ATLASRECTS-2769?filter=-1), # replace it as egamma is doing to use a C++ implementation pass # Make sure we add it before streams: for pos, alg in enumerate(topSequence): if LastCRWriter.getName() == alg.getName(): from CaloRingerAlgs.CaloRingerLocker import CaloRingerLocker CRLocker = CaloRingerLocker(name = "CaloRingerLocker", \ doElectron = caloRingerFlags.buildElectronCaloRings(), \
# --- Re-reconstruction steering flags: do not change if not an expert ! #rec.readAOD.set_Value_and_Lock(True) rec.doTrigger.set_Value_and_Lock(False) rec.readESD.set_Value_and_Lock(True) rec.doESD.set_Value_and_Lock(ReDoTrkEgComMuon and rec.readESD()) rec.doAOD.set_Value_and_Lock(False) rec.doWriteAOD.set_Value_and_Lock(False) rec.doWriteTAG.set_Value_and_Lock(False) rec.doCBNT.set_Value_and_Lock(False) rec.doHist.set_Value_and_Lock(False) rec.doDumpTES.set_Value_and_Lock(False) rec.doPerfMon.set_Value_and_Lock(False) rec.doDetailedPerfMon.set_Value_and_Lock(False) if rec.doESD(): rec.Commissioning=True rec.doMonitoring=False # Since I put doESD at True to allow for ID reco, I have to swich off many things # High level objects recAlgs.doMuonIDStandAlone.set_Value_and_Lock(False) recAlgs.doMuonIDCombined.set_Value_and_Lock(False) recAlgs.doMuGirl.set_Value_and_Lock(False) recAlgs.doTileMuID.set_Value_and_Lock(False) recAlgs.doMuonSpShower.set_Value_and_Lock(False) recAlgs.doCaloTrkMuId.set_Value_and_Lock(False) recAlgs.doMissingET.set_Value_and_Lock(False) recAlgs.doTrigger.set_Value_and_Lock(False) rec.doTau.set_Value_and_Lock(False) # However, we redo tracking, so egamma and Combined muons have to be run again # to match to the new TrackParticleCandidate container. (I redo only Staco/MuTag)
# topOptions for egammaRec_RTT # from RecExConfig.RecFlags import rec from RecExConfig.RecFlags import recAlgs # rec.doESD = False # if false, all algorithms are switched off by defaults doESD = rec.doESD() # if false, all algorithms are switched off by defaults #only switched minimal algorithm recAlgs.donewTracking = True donewTracking = recAlgs.donewTracking() # recAlgs.doEmCluster = True doEmCluster = recAlgs.doEmCluster() # recAlgs.doEgamma = True doEgamma = recAlgs.doEgamma() # recAlgs.doConversion = True doConversion = recAlgs.doConversion() # rec.doAOD = False doAOD = rec.doAOD() # rec.doWriteAOD = False doWriteAOD = rec.doWriteAOD() # rec.doWriteESD = False doWriteESD = rec.doWriteESD() # rec.doWriteTAG = False doWriteTAG = rec.doWriteTAG()