include("CaloRec/CaloTopoCluster_jobOptions.py") except Exception: treatException("Problem with CaloTopoCluster. Switched off.") jobproperties.CaloRecFlags.doCaloTopoCluster = False #EM Topoclusters if jobproperties.CaloRecFlags.doCaloEMTopoCluster(): try: include("CaloRec/EMTopoCluster_jobOptions.py") except Exception: treatException("Problem with EMTopoCluster. Switched off") jobproperties.CaloRecFlags.doCaloTopoCluster = False #Run egamma pdr.flag_domain('egamma') if rec.doEgamma(): protectedInclude("egammaRec/egammaRec_jobOptions.py") from AODFix.AODFix import AODFix_postEgammaRec AODFix_postEgammaRec() #Fix isolation from AthenaCommon.AlgSequence import AlgSequence topSequence = AlgSequence() if hasattr(topSequence, "EDtpIsoCentralAlg"): EDtpIsoCentralAlg = getattr(topSequence, "EDtpIsoCentralAlg") topSequence.remove(EDtpIsoCentralAlg) topSequence += EDtpIsoCentralAlg if hasattr(topSequence, "EDtpIsoForwardAlg"): EDtpIsoForwardAlg = getattr(topSequence, "EDtpIsoForwardAlg") topSequence.remove(EDtpIsoForwardAlg)
IsoCorFe = [[isoPar.coreCone, isoPar.pileupCorrection]] if doPFlow: IsoTypes.append( [isoPar.neflowisol20, isoPar.neflowisol30, isoPar.neflowisol40]) IsoCorEg.append([isoPar.coreCone, isoPar.pileupCorrection]) IsoCorMu.append([isoPar.coreCone, isoPar.pileupCorrection]) from IsolationAlgs.IsolationAlgsConf import IsolationBuilder isoBuilder = AlgFactory(IsolationBuilder, name="IsolationBuilder", CaloCellIsolationTool=CaloIsolationTool, CaloTopoIsolationTool=CaloIsolationTool, PFlowIsolationTool=CaloIsolationTool, TrackIsolationTool=TrackIsolationTool, FeIsoTypes=[[]] if not rec.doEgamma() else IsoTypesFe, FeCorTypes=IsoCorFe, EgIsoTypes=[[]] if not rec.doEgamma() else IsoTypes, EgCorTypes=IsoCorEg, MuIsoTypes=[[]] if not rec.doMuon() else IsoTypes, MuCorTypes=IsoCorMu, LeakageTool=None, OutputLevel=3) from RecExConfig.Configured import Configured class isoGetter(Configured): def configure(self): mlog = logging.getLogger('isoGetter.py::configure:') mlog.info('entering')
from RecExConfig.RecFlags import rec from RecExConfig.RecAlgsFlags import recAlgs #AOD list, also added to the ESD IsoAODESList = [] if rec.doWriteAOD() or rec.doWriteESD(): if rec.doMuon() or rec.doEgamma(): IsoAODESList += ["xAOD::EventShape#TopoClusterIsoCentralEventShape"] IsoAODESList += [ "xAOD::EventShapeAuxInfo#TopoClusterIsoCentralEventShapeAux." ] IsoAODESList += ["xAOD::EventShape#TopoClusterIsoForwardEventShape"] IsoAODESList += [ "xAOD::EventShapeAuxInfo#TopoClusterIsoForwardEventShapeAux." ] IsoAODESList += [ "xAOD::EventShape#TopoClusterIsoVeryForwardEventShape" ] IsoAODESList += [ "xAOD::EventShapeAuxInfo#TopoClusterIsoVeryForwardEventShapeAux." ] if recAlgs.doEFlow(): IsoAODESList += [ "xAOD::EventShape#ParticleFlowIsoCentralEventShape" ] IsoAODESList += [ "xAOD::EventShapeAuxInfo#ParticleFlowIsoCentralEventShapeAux." ] IsoAODESList += [ "xAOD::EventShape#ParticleFlowIsoForwardEventShape"
include("BTagging/BTaggingReconstructionOutputAODList_jobOptions.py") fullESDList += CfgItemList("BTaggingAod", items=BTaggingAODList, allowWildCard=True) except Exception: treatException("Could not load BTagging item list") #isolation, EventShape containers for ED correction try: include("IsolationAlgs/IsoEventShapeOutputItemList_jobOptions.py") fullESDList += CfgItemList("Isolation", items=IsoAODESList) except Exception: treatException("Could not load IsoEventShape item list") #egamma if rec.doEgamma(): try: include("egammaRec/egammaOutputItemList_jobOptions.py") fullESDList += CfgItemList("egammaEsd", items=egammaESDList) except: treatException("Could not load egamma ESD item list") pass pass #eflow if recAlgs.doEFlow(): try: include("eflowRec/eflowRecESDList.py") fullESDList += CfgItemList("eflowEsd", items=eflowRecESDList) except: treatException("Could not load eflow ESD item list")
if (not rec.doMuon()) or (rec.readRDO() and not jobproperties.MuonRec.Enabled()): DQMonFlags.doMuonRawMon = False DQMonFlags.doMuonSegmentMon = False DQMonFlags.doMuonTrackMon = False DQMonFlags.doMuonAlignMon = False DQMonFlags.doMuonPhysicsMon = False DQMonFlags.doMuonTrkPhysMon = False DQMonFlags.doMuonCombinedMon = False if (not rec.doMuonCombined()) or (rec.readRDO() and not jobproperties.MuonCombinedRec.Enabled()): DQMonFlags.doMuonCombinedMon = False if (not rec.doEgamma()) or (rec.readRDO() and not jobproperties.egammaRecFlags.Enabled()): DQMonFlags.doEgammaMon = False #if (not rec.doJetRec()) or (rec.readRDO() and not jobproperties.JetRecFlags.Enabled()): if (not rec.doJetMissingETTag() or (rec.readRDO() and not jobproperties.JetRecFlags.Enabled())): DQMonFlags.doJetMon = False DQMonFlags.doMissingEtMon = False DQMonFlags.doJetTagMon = False #if (not rec.doTau()) or (rec.readRDO() and not jobproperties.TauRecFlags.Enabled()): if (not rec.doTau()): DQMonFlags.doTauMon = False # covered now by doJetMissingETTag
# 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') if rec.doEgamma(): protectedInclude("egammaRec/egammaRec_jobOptions.py")
doTriggerConfigOnly = True jobproperties.Trigger.doTriggerConfigOnly = True except: logRecExCommon_flags.info("TriggerJobOpts.TriggerFlags not available.") if not recAlgs.doTrigger() and not rec.readAOD() and not rec.readESD( ) and rec.doWriteTAG(): logRecExCommon_flags.warning( "no trigger and running from RDO: cannot write out tag, switching of trigger part of tag" ) include('EventTagAlgs/EventTagFlags.py') EventTagFlags.set_TriggerOff() if rec.doWriteTAG(): include('EventTagAlgs/EventTagFlags.py') if not rec.doEgamma(): EventTagFlags.set_ElectronOff() EventTagFlags.set_PhotonOff() if not rec.doJetMissingETTag(): EventTagFlags.set_MissingETOff() EventTagFlags.set_ParticleJetOff() if not rec.doMuon(): EventTagFlags.set_MuonOff() if not rec.doTau(): EventTagFlags.set_TauJetOff() if (rec.doAOD() or rec.doWriteAOD()) and _AODFlagsAvailable: from ParticleBuilderOptions.AODFlags import AODFlags # make sure AOD truth are off if truth is off if not rec.doTruth():
# 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
# MinBias if tf.NtupleProductionFlags.SliceTuples.doSlice("MinBias"): include("TrigMinBiasNtuple/TrigMinBiasNtuple_jo.py") pass # Muon if tf.NtupleProductionFlags.SliceTuples.doSlice("Muon") and rec.doMuon(): include("TrigMuonNtuple/TrigMuonNtuple_jo.py") pass # Tau if tf.NtupleProductionFlags.SliceTuples.doSlice("Tau") and rec.doTau(): include("TrigTauPerformAthena/TrigTauNtuple_jo.py") pass # Egamma if tf.NtupleProductionFlags.SliceTuples.doSlice("EGamma") and rec.doEgamma(): include("TrigEgammaNtuple/TrigEgammaNtuple_jo.py") pass #L1Calo if tf.NtupleProductionFlags.SliceTuples.doSlice("L1Calo"): include("TrigT1CaloCalibTools/L1Calo_D3PD_Tier1_jobOptions.py") pass # TrigMenu if tf.NtupleProductionFlags.SliceTuples.doSlice("TrigMenu"): include("TriggerMenuAnalysis/TriggerMenuAnalysis_Nt_Tier0.py") pass
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 : 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
DQMonFlags.doInDetAlignMon=False DQMonFlags.doInDetPerfMon=False if (not rec.doMuon()) or (rec.readRDO() and not jobproperties.MuonRec.Enabled()): DQMonFlags.doMuonRawMon=False DQMonFlags.doMuonSegmentMon=False DQMonFlags.doMuonTrackMon=False DQMonFlags.doMuonAlignMon=False DQMonFlags.doMuonPhysicsMon=False DQMonFlags.doMuonTrkPhysMon=False DQMonFlags.doMuonCombinedMon=False if (not rec.doMuonCombined()) or (rec.readRDO() and not jobproperties.MuonCombinedRec.Enabled()): DQMonFlags.doMuonCombinedMon=False if (not rec.doEgamma()) or (rec.readRDO() and not jobproperties.egammaRecFlags.Enabled()): DQMonFlags.doEgammaMon=False #if (not rec.doJetRec()) or (rec.readRDO() and not jobproperties.JetRecFlags.Enabled()): if (not rec.doJetMissingETTag() or (rec.readRDO() and not jobproperties.JetRecFlags.Enabled())): DQMonFlags.doJetMon=False DQMonFlags.doMissingEtMon=False DQMonFlags.doJetTagMon=False #if (not rec.doTau()) or (rec.readRDO() and not jobproperties.TauRecFlags.Enabled()): if (not rec.doTau()): DQMonFlags.doTauMon=False # covered now by doJetMissingETTag # if (not recAlgs.doMissingET()): # DQMonFlags.doMissingEtMon=False
IsoTypes.append( [isoPar.neflowisol20, isoPar.neflowisol30, isoPar.neflowisol40]) IsoCorEg.append([isoPar.coreCone, isoPar.pileupCorrection]) IsoCorEgExtra.append([isoPar.ptCorrection]) IsoCorMu.append([isoPar.coreCone, isoPar.pileupCorrection]) IsoCorMuExtra.append([]) from IsolationAlgs.IsolationAlgsConf import IsolationBuilder isoBuilder = AlgFactory( IsolationBuilder, name="IsolationBuilder", CaloCellIsolationTool=CaloIsolationTool, CaloTopoIsolationTool=CaloIsolationTool, PFlowIsolationTool=CaloIsolationTool, TrackIsolationTool=TrackIsolationTool, FeIsoTypes=[] if not rec.doEgamma() else IsoTypesFe, FeCorTypes=IsoCorFe, FeCorTypesExtra=IsoCorFeExtra, ElIsoTypes=[] if not rec.doEgamma() else IsoTypes, ElCorTypes=IsoCorEg, ElCorTypesExtra=IsoCorEgExtra, PhIsoTypes=[] if not rec.doEgamma() else IsoTypes, PhCorTypes=IsoCorEg, PhCorTypesExtra=IsoCorEgExtra, MuIsoTypes=IsoTypes if rec.doMuon() and muonRecFlags.doMuonIso() else [], MuCorTypes=IsoCorMu, MuCorTypesExtra=IsoCorMuExtra) from RecExConfig.Configured import Configured
#Customisation CustomCuts = [[3.0, 400, 'TightPrimary'], [3.0, 500, 'TightPrimary'], [3.0, 800, 'TightPrimary'], [3.0, 1200, 'TightPrimary'], [3.0, 1000, 'Loose'], [1.5, 1000, 'TightPrimary'], [5.0, 1000, 'TightPrimary']] for icut in CustomCuts: CustomType = icut[2] + 'z0' + str(int(10 * icut[0])) + 'Pt' + str( icut[1]) + 'MeV' print 'Building track isolation tool for type ', CustomType TrackIsolationCustom = xAOD__TrackIsolationTool(name='TrackIsolationTool' + CustomType) TrackIsolationCustom.TrackSelectionTool.maxZ0SinTheta = float(icut[0]) TrackIsolationCustom.TrackSelectionTool.minPt = float(icut[1]) TrackIsolationCustom.TrackSelectionTool.CutLevel = icut[2] ToolSvc += TrackIsolationCustom isoBuilderCustom = IsolationBuilder( name="IsolationBuilder" + CustomType, CaloCellIsolationTool=None, CaloTopoIsolationTool=None, PFlowIsolationTool=None, TrackIsolationTool=TrackIsolationCustom, EgIsoTypes=[[]] if not rec.doEgamma() else ptconeList, MuIsoTypes=[[]] if not rec.doMuon() else ptconeList, CustomConfgurationName=CustomType, OutputLevel=3) topSequence.insert(index, isoBuilderCustom) ## --postInclude 'RecJobTransforms/UseFrontier.py' RAWtoESD:'IsolationAlgs/CustomTrackIsoGetter.py'