def createPerfMonConfigFlags(): pcf = AthConfigFlags() # Two basic flags for PerfMonMT pcf.addFlag('PerfMon.doFastMonMT', False) pcf.addFlag('PerfMon.doFullMonMT', False) return pcf
def _createCfgFlags(): acf = AthConfigFlags() #combine the 3 previous flags into one # e.g. 'CondDB', 'VertexOverrideEventFile.txt', 'VertexOverride.txt',"LongBeamspot" acf.addFlag('Vertex.Source', 'CondDB') return acf
def setUp(self): # trivial case without any nested sequences log.setLevel(DEBUG) dummyCfgFlags = AthConfigFlags() dummyCfgFlags.lock() def AlgsConf1(flags): acc = ComponentAccumulator() a1 = TestAlgo("Algo1") a2 = TestAlgo("Algo2") return acc, [a1, a2] def AlgsConf2(flags): acc = ComponentAccumulator() result, algs = AlgsConf1(flags) acc.merge(result) a = TestAlgo("Algo3") print("algo3 when created %s" % id(a)) algs.append(a) return acc, algs acc = ComponentAccumulator() # top level algs acc1, algs = AlgsConf2(dummyCfgFlags) acc.merge(acc1) acc.addEventAlgo(algs) def AlgsConf3(flags): acc = ComponentAccumulator() na1 = TestAlgo("NestedAlgo1") return acc, na1 def AlgsConf4(flags): acc, na1 = AlgsConf3(flags) NestedAlgo2 = TestAlgo("NestedAlgo2") NestedAlgo2.OutputLevel = 7 return acc, na1, NestedAlgo2 acc.addSequence(seqAND("Nest")) acc.addSequence(seqAND("subSequence1"), parentName="Nest") acc.addSequence(parOR("subSequence2"), parentName="Nest") acc.addSequence(seqAND("sub2Sequence1"), parentName="subSequence1") acc.addSequence(seqAND("sub3Sequence1"), parentName="subSequence1") acc.addSequence(seqAND("sub4Sequence1"), parentName="subSequence1") accNA1 = AlgsConf4(dummyCfgFlags) acc.merge(accNA1[0]) acc.addEventAlgo(accNA1[1:], "sub2Sequence1") outf = open("testFile.pkl", "wb") acc.store(outf) outf.close() self.acc = acc
def createBFieldConfigFlags(): bcf = AthConfigFlags() # True when magnetic filed is taken from these flags rather than cond db (when available) bcf.addFlag("BField.override", True) # True when solenoid is on bcf.addFlag("BField.solenoidOn", True) # True when barrel toroid is on bcf.addFlag("BField.barrelToroidOn", True) # True when endcap toroid is on bcf.addFlag("BField.endcapToroidOn", True) return bcf
def createOverlayConfigFlags(): """Return an AthConfigFlags object with required flags""" flags = AthConfigFlags() # Data overlay flag flags.addFlag("Overlay.DataOverlay", False) # Overlay background StoreGate key prefix flags.addFlag("Overlay.BkgPrefix", "Bkg_") # Overlay signal StoreGate key prefix flags.addFlag("Overlay.SigPrefix", "Sig_") # Overlay extra input dependencies flags.addFlag("Overlay.ExtraInputs", [("McEventCollection", "TruthEvent")]) return flags
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration from __future__ import print_function from AthenaConfiguration.AthConfigFlags import AthConfigFlags acf=AthConfigFlags() acf.addFlag("x.flag1",1) acf.addFlag("x.flag2",2) acf.addFlag("x.flag3", lambda prev: prev.x.flag2*2 ) acf.addFlag("x.flag7", lambda prev: prev.x.flag1+27) print(acf.x.flag1) print(acf.x.flag3) #acf.addFlag("flag4", lambda prev: prev.get("flag5")*2 ) #acf.addFlag("flag5", lambda prev: prev.get("flag4")*2 ) #print (acf.get("flag4") -> Circular dependency! ) acf.addFlag("domain1.flag1","bla") acf.addFlag("domain1.flag2",lambda prev: prev.domain1.flag1*2) acf.addFlag("domain2.flag1","geh") acf.addFlag("domain2.flag2","xyz") #acf.addFlag("domain2.flagxxx","will fail") acf.lock() print("Initial flag container") acf.dump() acfPrime=acf.clone() acfPrime.flag3 = 42
def createTileConfigFlags(): tcf = AthConfigFlags() tcf.addFlag('Tile.doQIE', False) tcf.addFlag('Tile.doManyAmps', False) tcf.addFlag('Tile.doFlat', False) tcf.addFlag('Tile.doFit', False) tcf.addFlag('Tile.doFitCOOL', False) tcf.addFlag('Tile.doMF', False) tcf.addFlag('Tile.doOF1', False) tcf.addFlag('Tile.doOpt2', _doOpt2) tcf.addFlag('Tile.doOptATLAS', _doOptATLAS) tcf.addFlag('Tile.NoiseFilter', lambda prevFlags: -1 if prevFlags.Input.isMC else 1) tcf.addFlag('Tile.RunType', _getRunType) tcf.addFlag('Tile.correctTime', lambda prevFlags: ('collisions' in prevFlags.Beam.Type)) tcf.addFlag('Tile.correctTimeNI', True) tcf.addFlag('Tile.correctAmplitude', True) tcf.addFlag('Tile.AmpMinForAmpCorrection', 15.0) tcf.addFlag('Tile.TimeMinForAmpCorrection', lambda prevFlags: (prevFlags.Beam.BunchSpacing / -2.)) tcf.addFlag('Tile.TimeMaxForAmpCorrection', lambda prevFlags: (prevFlags.Beam.BunchSpacing / 2.)) tcf.addFlag('Tile.OfcFromCOOL', True) tcf.addFlag('Tile.BestPhaseFromCOOL', lambda prevFlags: ('collisions' in prevFlags.Beam.Type)) tcf.addFlag('Tile.readDigits', lambda prevFlags: not prevFlags.Input.isMC) tcf.addFlag('Tile.doOverflowFit', True) tcf.addFlag('Tile.zeroAmplitudeWithoutDigits', _zeroAmplitudeWithouDigits) tcf.addFlag('Tile.correctPedestalDifference', _correctPedestalDifference) tcf.addFlag('Tile.RawChannelContainer', _getRawChannelContainer) tcf.addFlag('Tile.useDCS', _useDCS) tcf.addFlag('Tile.TimingType', _getTimingType) return tcf
def createEgammaConfigFlags(): egcf = AthConfigFlags() # enable/disable the full egamma egcf.addFlag("Egamma.enabled", True) # do standard cluster-based egamma algorithm egcf.addFlag("Egamma.doCaloSeeded", True) egcf.addFlag("Egamma.doSuperclusters", True) # if true, do superculsers, false is SW egcf.addFlag("Egamma.doTopoSeeded", True) # if doing SW, also add toposeeded electrons # do forward egamma egcf.addFlag("Egamma.doForwardSeeded", True) # do egamma truth association when running on MC egcf.addFlag("Egamma.doTruthAssociation", True) # run the GSF refitting egcf.addFlag("Egamma.doGSF", True) # build conversion vertices egcf.addFlag("Egamma.doConversionBuilding", True) # The cluster corrections/calib egcf.addFlag("Egamma.Calib.ClusterCorrectionVersion", 'v12phiflip_noecorrnogap') egcf.addFlag("Egamma.Calib.MVAVersion", 'egammaMVACalib/offline/v7') ################################################## # The keys: should update to use file peeking info # Also not sure what's the best way to do this, might want to revisit # one idea is to make the keys have tuples with type, name, etc ################################################## def _cellContainer(prevFlags): if "AllCalo" in prevFlags.Input.Collections: # if have all the cells in input file, return it return "AllCalo" elif "AODCellContainer" in prevFlags.Input.Collections: # do we have the AOD cells? return "AODCellContainer" else: # assume they will be created return "AllCalo" egcf.addFlag("Egamma.Keys.Input.CaloCells", lambda prevFlags: _cellContainer(prevFlags)) egcf.addFlag("Egamma.Keys.Input.TopoClusters", 'CaloTopoCluster') # input topoclusters egcf.addFlag("Egamma.Keys.Input.TruthParticles", 'TruthParticles') egcf.addFlag("Egamma.Keys.Input.TruthEvents", 'TruthEvents') egcf.addFlag("Egamma.Keys.Input.TrackParticles", 'InDetTrackParticles') # input to GSF # the topoclusters selected for egamma from the input topoclusters egcf.addFlag("Egamma.Keys.Internal.EgammaTopoClusters", 'egammaTopoClusters') egcf.addFlag("Egamma.Keys.Internal.EgammaRecs", 'egammaRecCollection') egcf.addFlag("Egamma.Keys.Internal.PhotonSuperRecs", 'PhotonSuperRecCollection') egcf.addFlag("Egamma.Keys.Internal.ElectronSuperRecs", 'ElectronSuperRecCollection') # These are the clusters that are used to determine which cells to write out to AOD egcf.addFlag("Egamma.Keys.Output.EgammaLargeClusters", 'egamma711Clusters') egcf.addFlag("Egamma.Keys.Output.EgammaLargeClustersSuppESD", '') # don't define SuppAOD because the whole container is suppressed egcf.addFlag("Egamma.Keys.Output.ConversionVertices", 'GSFConversionVertices') egcf.addFlag("Egamma.Keys.Output.ConversionVerticesSuppESD", '-vxTrackAtVertex') egcf.addFlag("Egamma.Keys.Output.ConversionVerticesSuppAOD", '-vxTrackAtVertex') egcf.addFlag("Egamma.Keys.Output.CaloClusters", 'egammaClusters') egcf.addFlag("Egamma.Keys.Output.CaloClustersSuppESD", '') egcf.addFlag("Egamma.Keys.Output.CaloClustersSuppAOD", '') egcf.addFlag("Egamma.Keys.Output.TopoSeededClusters", 'egammaTopoSeededClusters') egcf.addFlag("Egamma.Keys.Output.TopoSeededClustersSuppESD", '') egcf.addFlag("Egamma.Keys.Output.TopoSeededClustersSuppAOD", '-CellLink') egcf.addFlag("Egamma.Keys.Output.Electrons", 'Electrons') egcf.addFlag("Egamma.Keys.Output.ElectronsSuppESD", '') egcf.addFlag( "Egamma.Keys.Output.ElectronsSuppAOD", '-e033.-e011.-e333.-e335.-e337.-e377.-isEMLHLoose.-isEMLHTight.-isEMLHMedium.-isEMLoose.-isEMMultiLepton.-isEMMedium.-isEMTight' ) egcf.addFlag("Egamma.Keys.Input.ForwardTopoClusters", 'CaloCalTopoClusters') egcf.addFlag("Egamma.Keys.Output.ForwardElectrons", 'ForwardElectrons') egcf.addFlag("Egamma.Keys.Output.ForwardElectronsSuppESD", '') egcf.addFlag("Egamma.Keys.Output.ForwardElectronsSuppAOD", '-isEMTight.-isEMMedium.-isEMLoose') egcf.addFlag("Egamma.Keys.Output.ForwardClusters", 'ForwardElectronClusters') egcf.addFlag("Egamma.Keys.Output.ForwardClustersSuppESD", '-SisterCluster') egcf.addFlag("Egamma.Keys.Output.ForwardClustersSuppAOD", '-SisterCluster.-CellLink') egcf.addFlag("Egamma.Keys.Output.Photons", 'Photons') egcf.addFlag("Egamma.Keys.Output.PhotonsSuppESD", '') egcf.addFlag("Egamma.Keys.Output.PhotonsSuppAOD", '-e033.-e011.-e333.-e335.-e337.-e377.-isEMLoose.-isEMTight') egcf.addFlag("Egamma.Keys.Output.GSFTrackParticles", 'GSFTrackParticles') egcf.addFlag( "Egamma.Keys.Output.GSFTrackParticlesSuppESD", '-caloExtension.-cellAssociation.-perigeeExtrapEta.-perigeeExtrapPhi') egcf.addFlag( "Egamma.Keys.Output.GSFTrackParticlesSuppAOD", '-caloExtension.-cellAssociation.-perigeeExtrapEta.-perigeeExtrapPhi') # not xAOD egcf.addFlag("Egamma.Keys.Output.GSFTracks", 'GSFTracks') egcf.addFlag("Egamma.Keys.Output.TruthParticles", 'egammaTruthParticles') egcf.addFlag("Egamma.Keys.Output.TruthParticlesSuppESD", '-caloExtension') egcf.addFlag("Egamma.Keys.Output.TruthParticlesSuppAOD", '-caloExtension') return egcf
def _createCfgFlags(): acf = AthConfigFlags() #Flags steering the job execution: from AthenaCommon.Constants import INFO acf.addFlag('Exec.OutputLevel', INFO) #Global Output Level acf.addFlag('Exec.MaxEvents', -1) acf.addFlag("Exec.SkipEvents", 0) acf.addFlag("Exec.DebugStage", "") #Flags describing the input data acf.addFlag('Input.Files', [ "_ATHENA_GENERIC_INPUTFILE_NAME_", ]) # former global.InputFiles acf.addFlag('Input.SecondaryFiles', []) # secondary input files for DoubleEventSelector acf.addFlag('Input.isMC', lambda prevFlags: "IS_SIMULATION" in GetFileMD( prevFlags.Input.Files).get("eventTypes", [])) # former global.isMC acf.addFlag('Input.RunNumber', lambda prevFlags: list( GetFileMD(prevFlags.Input.Files).get("runNumbers", [])) ) # former global.RunNumber acf.addFlag( 'Input.ProjectName', lambda prevFlags: GetFileMD(prevFlags.Input.Files).get( "project_name", "data17_13TeV")) # former global.ProjectName acf.addFlag('Input.Format', lambda prevFlags: GetFileMD(prevFlags.Input.Files).get( "file_type", "")) # former global.InputFormat def _inputCollections(inputFile): if not inputFile: return [] rawCollections = [ type_key[1] for type_key in GetFileMD(inputFile).get("itemList", []) ] collections = filter(lambda col: not col.endswith('Aux.'), rawCollections) return collections acf.addFlag('Input.Collections', lambda prevFlags: _inputCollections(prevFlags.Input.Files)) acf.addFlag( 'Input.SecondaryCollections', lambda prevFlags: _inputCollections(prevFlags.Input.SecondaryFiles)) acf.addFlag('Concurrency.NumProcs', 0) acf.addFlag('Concurrency.NumThreads', 0) acf.addFlag('Concurrency.NumConcurrentEvents', 0) acf.addFlag('Scheduler.CheckDependencies', True) acf.addFlag('Scheduler.ShowDataDeps', True) acf.addFlag('Scheduler.ShowDataFlow', True) acf.addFlag('Scheduler.ShowControlFlow', True) acf.addFlag( 'Common.isOnline', False ) # Job runs in an online environment (access only to resources available at P1) # former global.isOnline acf.addFlag( 'Common.useOnlineLumi', lambda prevFlags: prevFlags.Common.isOnline ) # Use online version of luminosity. ??? Should just use isOnline? acf.addFlag('Common.doExpressProcessing', False) acf.addFlag('Common.bunchCrossingSource', lambda prevFlags: "MC" if prevFlags.Input.isMC else "TrigConf" ) # what BunchCrossingTool should we use? def _checkProject(): import os if "AthSimulation_DIR" in os.environ: return "AthSimulation" if "AthGeneration_DIR" in os.environ: return "AthGeneration" #TODO expand this method. return "Athena" acf.addFlag('Common.Project', _checkProject()) # replace global.Beam* acf.addFlag('Beam.BunchSpacing', 25) # former global.BunchSpacing acf.addFlag('Beam.Type', lambda prevFlags: GetFileMD(prevFlags.Input.Files).get( 'beam_type', 'collisions')) # former global.BeamType acf.addFlag("Beam.NumberOfCollisions", lambda prevFlags: 2. if prevFlags.Beam.Type == 'collisions' else 0. ) # former global.NumberOfCollisions acf.addFlag('Beam.Energy', lambda prevFlags: GetFileMD(prevFlags.Input.Files).get( 'beam_energy', 7 * TeV)) # former global.BeamEnergy acf.addFlag('Beam.estimatedLuminosity', lambda prevFlags : ( 1E33*(prevFlags.Beam.NumberOfCollisions)/2.3 ) *\ (25./prevFlags.Beam.BunchSpacing)) # former flobal.estimatedLuminosity acf.addFlag('Output.EVNTFileName', '') acf.addFlag('Output.HITSFileName', '') acf.addFlag('Output.RDOFileName', '') acf.addFlag('Output.RDO_SGNLFileName', '') acf.addFlag('Output.ESDFileName', '') acf.addFlag('Output.AODFileName', '') acf.addFlag('Output.HISTFileName', '') acf.addFlag('Output.doWriteRDO', lambda prevFlags: bool( prevFlags.Output.RDOFileName)) # write out RDO file acf.addFlag('Output.doWriteRDO_SGNL', lambda prevFlags: bool( prevFlags.Output.RDO_SGNLFileName)) # write out RDO_SGNL file acf.addFlag('Output.doWriteESD', lambda prevFlags: bool( prevFlags.Output.ESDFileName)) # write out ESD file acf.addFlag('Output.doESD', lambda prevFlags: prevFlags.Output.doWriteESD ) # produce ESD containers acf.addFlag('Output.doWriteAOD', lambda prevFlags: bool( prevFlags.Output.AODFileName)) # write out AOD file acf.addFlag('Output.doWriteBS', False) # write out RDO ByteStream file # Might move this elsewhere in the future. # Some flags from https://gitlab.cern.ch/atlas/athena/blob/master/Tracking/TrkDetDescr/TrkDetDescrSvc/python/TrkDetDescrJobProperties.py # (many, e.g. those that set properties of one tool are not needed) acf.addFlag('TrackingGeometry.MagneticFileMode', 6) acf.addFlag('TrackingGeometry.MaterialSource', 'COOL') # Can be COOL, Input or None #Detector Flags: def __detector(): from AthenaConfiguration.DetectorConfigFlags import createDetectorConfigFlags return createDetectorConfigFlags() acf.addFlagsCategory("Detector", __detector) #Simulation Flags: def __simulation(): from G4AtlasApps.SimConfigFlags import createSimConfigFlags return createSimConfigFlags() _addFlagsCategory(acf, "Sim", __simulation, 'G4AtlasApps') #Digitization Flags: def __digitization(): from Digitization.DigitizationConfigFlags import createDigitizationCfgFlags return createDigitizationCfgFlags() _addFlagsCategory(acf, "Digitization", __digitization, 'Digitization') #Overlay Flags: def __overlay(): from OverlayConfiguration.OverlayConfigFlags import createOverlayConfigFlags return createOverlayConfigFlags() _addFlagsCategory(acf, "Overlay", __overlay, 'OverlayConfiguration') #Geo Model Flags: def __geomodel(): from AthenaConfiguration.GeoModelConfigFlags import createGeoModelConfigFlags return createGeoModelConfigFlags() acf.addFlagsCategory("GeoModel", __geomodel) #IOVDbSvc Flags: acf.addFlag( "IOVDb.GlobalTag", lambda prevFlags: GetFileMD(prevFlags.Input.Files).get( "IOVDbGlobalTag", None) or "CONDBR2-BLKPA-2017-05") from IOVDbSvc.IOVDbAutoCfgFlags import getDatabaseInstanceDefault acf.addFlag("IOVDb.DatabaseInstance", getDatabaseInstanceDefault) def __bfield(): from MagFieldConfig.BFieldConfigFlags import createBFieldConfigFlags return createBFieldConfigFlags() _addFlagsCategory(acf, "BField", __bfield, 'MagFieldConfig') def __lar(): from LArConfiguration.LArConfigFlags import createLArConfigFlags return createLArConfigFlags() _addFlagsCategory(acf, "LAr", __lar, 'LArConfiguration') def __tile(): from TileConfiguration.TileConfigFlags import createTileConfigFlags return createTileConfigFlags() _addFlagsCategory(acf, 'Tile', __tile, 'TileConfiguration') def __calo(): from CaloRec.CaloConfigFlags import createCaloConfigFlags return createCaloConfigFlags() _addFlagsCategory(acf, 'Calo', __calo, 'CaloRec') #Random engine Flags: acf.addFlag( "Random.Engine", "dSFMT") # Random service used in {"dSFMT", "Ranlux64", "Ranecu"} def __trigger(): from TriggerJobOpts.TriggerConfigFlags import createTriggerFlags return createTriggerFlags() _addFlagsCategory(acf, "Trigger", __trigger, 'TriggerJobOpts') def __indet(): from InDetConfig.InDetConfigFlags import createInDetConfigFlags return createInDetConfigFlags() _addFlagsCategory(acf, "InDet", __indet, 'InDetConfig') def __muon(): from MuonConfig.MuonConfigFlags import createMuonConfigFlags return createMuonConfigFlags() _addFlagsCategory(acf, "Muon", __muon, 'MuonConfig') def __muoncombined(): from MuonCombinedConfig.MuonCombinedConfigFlags import createMuonCombinedConfigFlags return createMuonCombinedConfigFlags() _addFlagsCategory(acf, "MuonCombined", __muoncombined, 'MuonCombinedConfig') def __egamma(): from egammaConfig.egammaConfigFlags import createEgammaConfigFlags return createEgammaConfigFlags() _addFlagsCategory(acf, "Egamma", __egamma, 'egammaConfig') def __met(): from METReconstruction.METConfigFlags import createMETConfigFlags return createMETConfigFlags() _addFlagsCategory(acf, "MET", __met, 'METReconstruction') def __pflow(): from eflowRec.PFConfigFlags import createPFConfigFlags return createPFConfigFlags() _addFlagsCategory(acf, "PF", __pflow, 'eflowRec') def __btagging(): from BTagging.BTaggingConfigFlags import createBTaggingConfigFlags return createBTaggingConfigFlags() _addFlagsCategory(acf, "BTagging", __btagging, 'BTagging') def __dq(): from AthenaMonitoring.DQConfigFlags import createDQConfigFlags dqf = createDQConfigFlags() return dqf _addFlagsCategory(acf, "DQ", __dq, 'AthenaMonitoring') def __perfmon(): from PerfMonComps.PerfMonConfigFlags import createPerfMonConfigFlags return createPerfMonConfigFlags() _addFlagsCategory(acf, "PerfMon", __perfmon, 'PerfMonComps') return acf
def createBTaggingConfigFlags(): btagcf = AthConfigFlags() btagcf.addFlag("BTagging.run2TaggersList", [ 'IP2D', 'IP3D', 'SV1', 'SoftMu', 'JetFitterNN', 'MV2c10', 'MV2c10mu', 'MV2c10rnn', 'MV2c100', 'MV2cl100', 'RNNIP', 'DL1', 'DL1mu', 'DL1rnn' ]) btagcf.addFlag("BTagging.Run2TrigTaggers", ['IP2D', 'IP3D', 'SV1', 'JetFitterNN', 'MV2c10']) btagcf.addFlag("BTagging.Run3NewTrigTaggers", ['RNNIP', 'DL1', 'DL1rnn']) # Disable JetVertexCharge ATLASRECTS-4506 btagcf.addFlag( "BTagging.RunModus", "analysis" ) # reference mode used in FlavourTagPerformanceFramework (RetagFragment.py) btagcf.addFlag( "BTagging.ReferenceType", "ALL") # reference type for IP and SV taggers (B, UDSG, ALL) btagcf.addFlag("BTagging.JetPtMinRef", 15e3) # in MeV for uncalibrated pt btagcf.addFlag("BTagging.PrimaryVertexCollectionName", "PrimaryVertices") btagcf.addFlag("BTagging.Grades", [ "0HitIn0HitNInExp2", "0HitIn0HitNInExpIn", "0HitIn0HitNInExpNIn", "0HitIn0HitNIn", "0HitInExp", "0HitIn", "0HitNInExp", "0HitNIn", "InANDNInShared", "PixShared", "SctShared", "InANDNInSplit", "PixSplit", "Good" ]) #Do we really need this in AthConfigFlags? #Comments in BTaggingConfiguration.py btagcf.addFlag("BTagging.OutputFiles.Prefix", "BTagging_") btagcf.addFlag( "BTagging.GeneralToolSuffix", '' ) #Not sure it will stay like that later on. Was '', 'Trig, or 'AODFix' return btagcf
def createInDetConfigFlags(): icf = AthConfigFlags() icf.addFlag("InDet.doDBMstandalone", False) icf.addFlag("InDet.doDBM", False) icf.addFlag( "InDet.doPrintConfigurables", False) # if this is on all the print(InDetXYZ) lines are activated # FIXME: Algorithm property instead of flag icf.addFlag("InDet.doNewTracking", True) # Turn running of newTracking on and off # FIXME: Flags shouldn't turn on/off individual algorithms icf.addFlag( "InDet.doPseudoTracking", False) # Turn running of the truth seeded pseudo tracking on and off icf.addFlag( "InDet.doIdealPseudoTracking", True) # Run pseudoTracking with 100\% hit assignment efficiency icf.addFlag( "InDet.doSplitReco", False ) # Turn running of the truth seeded pseudo tracking only for pileup on and off. Only makes sense to run on RDO file where SplitDigi was used! icf.addFlag("InDet.preProcessing", True) # Turn running of pre processing on and off icf.addFlag("InDet.doPRDFormation", True) # Turn running of PRD formation on and off icf.addFlag("InDet.doPixelPRDFormation", True) # Turn running of pixel PRD formation on and off icf.addFlag("InDet.doSCT_PRDFormation", True) # Turn running of SCT PRD formation on and off icf.addFlag("InDet.doTRT_PRDFormation", True) # Turn running of TRT PRD formation on and off icf.addFlag("InDet.doSpacePointFormation", True) # Turn running of space point formation on and off icf.addFlag("InDet.doRefit", False) # Turn running of refitting on and off icf.addFlag("InDet.doSLHC", False) # Turn running of SLHC reconstruction on and off icf.addFlag("InDet.doIBL", False) # Turn running of IBL reconstruction on and off icf.addFlag( "InDet.doHighPileup", False) # Turn running of high pile-up reconstruction on and off icf.addFlag("InDet.doMinimalReco", False) # Turn running of minimal reconstruction on and off icf.addFlag( "InDet.doDVRetracking", False ) # Turn running of large-d0 retracking mode on and off. This flag assumes that the processing is done from a (D)ESD file icf.addFlag("InDet.postProcessing", True) # Turn running of post processing on and off icf.addFlag("InDet.doTruth", True) # Turn running of truth matching on and off icf.addFlag("InDet.loadTools", True) # Turn loading of tools on and off icf.addFlag("InDet.doBackTracking", True) # Turn running of backtracking on and off icf.addFlag("InDet.doLowPt", True) # Turn running of doLowPt second pass on and off icf.addFlag("InDet.doVeryLowPt", False) # Turn running of doVeryLowPt thrid pass on and off icf.addFlag( "InDet.doSLHCConversionFinding", True) # Turn running of doSLHCConversionFinding second pass on and off icf.addFlag("InDet.doForwardTracks", False) # Turn running of doForwardTracks pass on and off icf.addFlag( "InDet.doLowPtLargeD0", False ) # Turn running of doLargeD0 second pass down to 100 MeV on and off Turn running of doLargeD0 second pass on and off icf.addFlag("InDet.doLargeD0", False) icf.addFlag( "InDet.useExistingTracksAsInput", False ) # Use already processed Track from a (D)ESD input file. This flag is related with ProcessedESDTracks InDetKey icf.addFlag( "InDet.cutLevel", 16 ) # Control cuts and settings for different lumi to limit CPU and disk space icf.addFlag( "InDet.priVtxCutLevel", 3 ) # Control vertexing cuts and settings for different lumi to limit CPU and disk space icf.addFlag("InDet.doBremRecovery", True) # Turn on running of Brem Recover in tracking icf.addFlag("InDet.doCaloSeededBrem", True) # Brem Recover in tracking restricted to Calo ROIs icf.addFlag("InDet.doHadCaloSeededSSS", False) # Use Recover SSS to Calo ROIs icf.addFlag("InDet.doCaloSeededAmbi", False) # Use Calo ROIs to seed specific cuts for the ambi icf.addFlag("InDet.doCaloSeededRefit", False) # Use Calo ROIs to seed refif for the ambi processor icf.addFlag("InDet.doBeamGas", False) # Turn running of BeamGas second pass on and off icf.addFlag("InDet.doBeamHalo", False) # Turn running of BeamHalo second pass on and off icf.addFlag("InDet.doVtxLumi", False) # Turn running of vertex lumi reconstruction on and off icf.addFlag( "InDet.doVtxBeamSpot", False) # Turn running of vertex BeamSpot reconstruction on and off icf.addFlag("InDet.doHeavyIon", False) # Turn running of HeavyIons on and off icf.addFlag("InDet.doParticleCreation", True) # Turn running of particle creation on and off icf.addFlag( "InDet.KeepParameters", True) # Keep extra parameters on slimmed tracks False to drop them icf.addFlag( "InDet.KeepFirstParameters", False ) # Keep the first set of track parameters in addition to the defining ones for TrackParticles. False to drop them icf.addFlag( "InDet.doTrackSegmentsPixel", False) # Turn running of track segment creation in pixel on and off icf.addFlag( "InDet.doTrackSegmentsSCT", False) # Turn running of track segment creation in SCT on and off icf.addFlag( "InDet.doTrackSegmentsTRT", False) # Turn running of track segment creation in TRT on and off icf.addFlag("InDet.doMonitoringGlobal", False) # Use to turn on global monitoring icf.addFlag("InDet.doMonitoringPrimaryVertexingEnhanced", False) # Use to turn on enhanced primary vertex monitoring icf.addFlag("InDet.doMonitoringPixel", False) # Use to turn on Pixel monitoring icf.addFlag("InDet.doMonitoringSCT", False) # Use to turn on SCT monitoring icf.addFlag("InDet.doMonitoringTRT", False) # Use to turn on TRT monitoring icf.addFlag("InDet.doMonitoringAlignment", False) # Use to turn on alignment monitoring icf.addFlag( "InDet.useDynamicAlignFolders", False ) # Deprecated property - use InDetGeometryFlags directly to choose the alignment folder scheme icf.addFlag("InDet.doPerfMon", False) # Use to turn on PerfMon icf.addFlag("InDet.AODall", False) icf.addFlag("InDet.useBeamConstraint", True) # use beam spot service in new tracking icf.addFlag( "InDet.kalmanUpdator", 'smatrix' ) # control which updator to load for KalmanFitter ("None"/"fast"/"smatrix"/"weight"/"amg") icf.addFlag("InDet.magField", 'None') # control which field tool to use ("None"/"fast") icf.addFlag( "InDet.propagatorType", 'RungeKutta') # control which propagator to use ('RungeKutta'/'STEP') icf.addFlag( "InDet.trackFitterType", 'GlobalChi2Fitter' ) # control which fitter to be used: 'KalmanFitter', 'KalmanDNAFitter', 'DistributedKalmanFilter', 'GlobalChi2Fitter', 'GaussianSumFilter' icf.addFlag("InDet.doHolesOnTrack", True) # do holes search from now on in summry tool icf.addFlag("InDet.useZvertexTool", False) # start with Zvertex finding icf.addFlag("InDet.doSiSPSeededTrackFinder", False) # use track finding in silicon icf.addFlag("InDet.doTRTExtensionNew", True) # turn on / off TRT extensions icf.addFlag("InDet.trtExtensionType", 'xk') # which extension type ("xk"/"DAF") icf.addFlag("InDet.redoTRT_LR", True) # use smart TRT LR/tube hit creator and redo ROTs icf.addFlag( "InDet.doTrtSegments", True ) # control to run TRT Segment finding (do it always after new tracking!) icf.addFlag("InDet.doTRTPhaseCalculation", False) # control to run TRT phase calculation icf.addFlag("InDet.doTRTSeededTrackFinder", False) # control running the back tracking icf.addFlag( "InDet.loadTRTSeededSPFinder", True ) # control which SP finder is used exclusive with loadSimpleTRTSeededSPFinder control which SP finder is used icf.addFlag("InDet.loadSimpleTRTSeededSPFinder", True) icf.addFlag("InDet.doResolveBackTracks", False) # control running the ambi on back tracking icf.addFlag("InDet.doTRTStandalone", True) # control TRT Standalone icf.addFlag("InDet.refitROT", True) # control if refit is done from PRD or ROT icf.addFlag("InDet.doSlimming", True) # turn track slimming on/off icf.addFlag( "InDet.doSlimPoolTrack", True ) # Slimming at converter level rather than creating a slim track collections; requires slimming to be on. icf.addFlag("InDet.doWriteTracksToESD", True) # turn track slimming on/off icf.addFlag("InDet.doVertexFinding", True) # Turn on the primary vertex reconstruction icf.addFlag( "InDet.primaryVertexSetup", 'IterativeFinding' ) # string to store the type of finder/fitter for pri vertexing, possible types: 'AdaptiveMultiFinding', 'IterativeFinding', 'AdaptiveFinding', 'DefaultFastFinding', 'DefaultFullFinding', 'DefaultKalmanFinding', 'DefaultAdaptiveFinding', 'DefaultVKalVrtFinding' 'MedImgMultiFinding' 'GaussIterativeFinding' 'GaussAdaptiveMultiFinding' icf.addFlag( "InDet.primaryVertexCutSetup", 'Offline' ) # string to store the type of cuts to be used in PV reconstruction: 'Offline', 'IBL', 'SLHC' 'HeavyIon' icf.addFlag( "InDet.vertexSeedFinder", 'SlidingWindowMultiSeedFinder' ) # string to store the type of seed finder, possible types: 'SlidingWindowMultiSeedFinder', 'HistogrammingMultiSeedFinder', 'DivisiveMultiSeedFinder' icf.addFlag( "InDet.primaryVertexSortingSetup", 'SumPt2Sorting' ) # string to store the type of sorting algorithm to separate signal and pile-up vertices, possible types: 'NoReSorting','SumPt2Sorting','VxProbSorting','NNSorting' icf.addFlag( "InDet.doPrimaryVertex3DFinding", True ) # will be set to false automatically if beam constraint ON, otherwise true. Control if to use 3d seeding for primary vertex finding (useful in case of poor / no knowledge of the beam spot. Will be set to false automatically if beam constraint ON, otherwise true icf.addFlag( "InDet.doVertexFindingForMonitoring", False ) # Turn on the primary vertex reconstruction needed to run the enhanced vertex monitoring, this runs the iterative PV with no beam constraint icf.addFlag( "InDet.doSplitVertexFindingForMonitoring", False ) # will be set to false automatically if beam constraint ON, otherwise true. Turn on the primary vertex reconstruction needed to run the enhanced vertex monitoring, this runs iterative PV in split mode icf.addFlag( "InDet.perigeeExpression", 'BeamLine' ) # Express track parameters wrt. to : 'BeamLine','BeamSpot','Vertex' (first primary vertex) icf.addFlag( "InDet.secondaryVertexCutSetup", 'PileUp' ) # string to store the type of cuts to be used in PV reconstruction: 'StartUp', 'PileUp' icf.addFlag( "InDet.conversionVertexCutSetup", 'ConversionPileUp' ) # string to store the type of cuts to be used in conversion reconstruction: 'ConversionStartUp', 'ConversionPileUp' icf.addFlag( "InDet.doSharedHits", True) # control if the shared hits are recorded in TrackPatricles icf.addFlag("InDet.doV0Finder", False) # switch on/off V0 finder icf.addFlag("InDet.doSimpleV0Finder", False) # switch on/off simple V0 finder icf.addFlag("InDet.useV0Fitter", False) # use V0 Fitter (alternative is VKalVrt) icf.addFlag("InDet.doSecVertexFinder", False) # switch on/off conversion finder fitting V0s icf.addFlag("InDet.doConversions", False) # switch on/off conversion finder icf.addFlag("InDet.doStatistics", True) icf.addFlag("InDet.doPhysValMon", False) # Use to turn on Physics Validation Monitoring icf.addFlag("InDet.materialInteractions", True) icf.addFlag( "InDet.materialInteractionsType", 3 ) # Control which type of particle hypothesis to use for the material interactions 0=non-interacting,1=electron,2=muon,3=pion,4=kaon,5=proton. See ParticleHypothesis.h for full definition. icf.addFlag("InDet.doSctClusterNtuple", False) icf.addFlag("InDet.doTrkNtuple", False) icf.addFlag("InDet.doPixelTrkNtuple", False) icf.addFlag("InDet.doSctTrkNtuple", False) icf.addFlag("InDet.doTrtTrkNtuple", False) icf.addFlag("InDet.doVtxNtuple", False) icf.addFlag("InDet.doConvVtxNtuple", False) icf.addFlag("InDet.doV0VtxNtuple", False) icf.addFlag("InDet.doTrkD3PD", False) icf.addFlag("InDet.doPixelTrkD3PD", False) icf.addFlag("InDet.doSctTrkD3PD", False) icf.addFlag("InDet.doTrtTrkD3PD", False) icf.addFlag( "InDet.doVtxD3PD", False ) # fills the D3PD part of the default primary vertex finder (which is in ESD/AOD or produced during reco, normally WITH beam constraint) icf.addFlag( "InDet.doVtxMonitoringD3PD", False ) # fills the D3PD parts for the unconstrained PV and the split vtx, works only with iterative finder icf.addFlag("InDet.doConvVtxD3PD", False) icf.addFlag("InDet.doV0VtxD3PD", False) icf.addFlag("InDet.doTriggerD3PD", False) icf.addFlag("InDet.removeTRTNoise", False) icf.addFlag("InDet.noTRTTiming", False) icf.addFlag("InDet.InDet25nsec", False) icf.addFlag("InDet.selectSCTIntimeHits", True) # defines if the X1X mode is used for the offline or not icf.addFlag("InDet.cutSCTOccupancy", True) icf.addFlag("InDet.useDCS", True) icf.addFlag( "InDet.truthMatchStrategy", 'TruthMatchRatio' ) # defines how truth matching is done. possible values TruthMatchRatio (old style) or TruthMatchTanimoto (new style) icf.addFlag("InDet.doFatras", False) # Switch for FATRAS running icf.addFlag("InDet.doSGDeletion", False) # Drop contianers from SG ones finished with them icf.addFlag("InDet.doLowBetaFinder", True) # Switch for running Low-Beta finer icf.addFlag("InDet.useHVForSctDCS", False) # Temporary switch for using 20V HV limit for SCT DCS icf.addFlag("InDet.disableTracking", False) # Disable all tracking algorithms icf.addFlag( "InDet.disableInDetReco", False ) # Disable all ID reconstruction: pre-processing,tracking, post-processing etc. Still does the configuration: job porperties, cuts, loaign of tools and conditions icf.addFlag("InDet.doPixelClusterSplitting", True) # Try to split pixel clusters icf.addFlag("InDet.pixelClusterSplittingType", 'NeuralNet') # choose splitter type: NeuralNet or AnalogClus icf.addFlag("InDet.pixelClusterSplitProb1", 0.6) # Cut value for splitting clusters into two parts icf.addFlag("InDet.pixelClusterSplitProb2", 0.2) # Cut value for splitting clusters into three parts icf.addFlag("InDet.pixelClusterSplitProb1_run1", 0.5) # Cut value for splitting clusters into two parts icf.addFlag("InDet.pixelClusterSplitProb2_run1", 0.5) # Cut value for splitting clusters into three parts icf.addFlag("InDet.pixelClusterSplitMinPt", 1000) # Min pt for tracks to try and split hits icf.addFlag("InDet.pixelClusterBadClusterID", 3) # Select the mode to identify suspicous pixel clusteri icf.addFlag("InDet.useBroadClusterErrors", False) # Use broad cluster errors for Pixel/SCT #TODO: useBroadPixClusterErrors and ...SCT... were set to none such that they print a warning if they're accessed without being set. None will be interpreted as False (same behavior as old config) but defaults cannot be None icf.addFlag("InDet.useBroadPixClusterErrors", False) # Use broad cluster errors for Pixel icf.addFlag("InDet.useBroadSCTClusterErrors", False) # Use broad cluster errors for SCT icf.addFlag("InDet.writeRDOs", False) # Write RDOs into ESD icf.addFlag("InDet.writePRDs", True) # Write PRDs into ESD icf.addFlag("InDet.doMinBias", False) # Switch for running MinBias settings icf.addFlag("InDet.doLowMuRunSetup", False) # Switch for running MinBias runs at low lumi settings icf.addFlag("InDet.doRobustReco", False) # Switch for running Robust settings icf.addFlag( "InDet.doSingleCollisionVertexReco", False ) # Switch for running veretx reconstruction in single collision mode icf.addFlag( "InDet.useMBTSTimeDiff", False) # Switch for skipping background events based on MBTS time info icf.addFlag("InDet.useNewSiSPSeededTF", False) # Switch for using new SiSPSeededTrackFinder strategy icf.addFlag("InDet.doxAOD", True) # Switch for running AOD to xAOD conversion algs icf.addFlag("InDet.doCaloSeededTRTSegments", False) # Switch for running AOD to xAOD conversion algs icf.addFlag( "InDet.doInnerDetectorCommissioning", False) # Switch for running looser settings in ID for commissioning icf.addFlag("InDet.doTIDE_Ambi", True) # Switch for running TIDE Ambi icf.addFlag( "InDet.doRefitInvalidCov", False ) # Try Kalman fitter if the track fit in the ambiguity processor produces non positive definitematrices. icf.addFlag( "InDet.doRejectInvalidCov", False ) # Reject all tracks which have a non positive definite covariance matrix after the refit. icf.addFlag( "InDet.doTIDE_RescalePixelCovariances", False) # Switch for running TIDE pixel cluster covariance rescaling icf.addFlag("InDet.doSSSfilter", True) # Switch for running SSS filter icf.addFlag("InDet.pT_SSScut", -1) # Pt cut for SSS filter [GeV] icf.addFlag("InDet.ForceCoraCool", False) # Use old (non CoolVectorPayload) SCT Conditions icf.addFlag("InDet.ForceCoolVectorPayload", False) # Use new (CoolVectorPayload) SCT Conditions icf.addFlag( "InDet.doTrackSegmentsDisappearing", True ) # Turn running of track segment creation in pixel after NewTracking, and with PRD association, on and off icf.addFlag( "InDet.doSLHCVeryForward", False ) # Turn running of SLHC reconstruction for Very Forward extension on and off icf.addFlag( "InDet.doTRTGlobalOccupancy", False ) # Turn running of Event Info TRT Occupancy Filling Alg on and off (also whether it is used in TRT PID calculation) icf.addFlag( "InDet.doNNToTCalibration", False) # USe ToT calibration for NN clustering rather than Charge icf.addFlag( "InDet.keepAdditionalHitsOnTrackParticle", False ) # Do not drop first/last hits on track (only for special cases - will blow up TrackParticle szie!!!) icf.addFlag( "InDet.doSCTModuleVeto", False) # Turn on SCT_ModuleVetoSvc, allowing it to be configured later icf.addFlag( "InDet.doParticleConversion", False ) # In case anyone still wants to do Rec->xAOD TrackParticle Conversion icf.addFlag( "InDet.doStoreTrackSeeds", False ) # Turn on to save the Track Seeds in a xAOD track collecting for development studies icf.addFlag( "InDet.doHIP300", False ) # Switch for running MinBias settings with a 300 MeV pT cut (for Heavy Ion Proton) icf.addFlag("InDet.checkDeadElementsOnTrack", True) # Enable check for dead modules and FEs icf.addFlag( "InDet.doDigitalROTCreation", False ) # use PixelClusterOnTrackToolDigital during ROT creation to save CPU icf.addFlag( "InDet.usePixelDCS", lambda prevFlags: (prevFlags.InDet.useDCS and prevFlags.Detector.RecoPixel)) icf.addFlag( "InDet.useSctDCS", lambda prevFlags: (prevFlags.InDet.useDCS and prevFlags.Detector.RecoSCT)) return icf
def createDQConfigFlags(): acf = AthConfigFlags() acf.addFlag('DQ.doMonitoring', True) acf.addFlag('DQ.doStreamAwareMon', True) acf.addFlag('DQ.disableAtlasReadyFilter', False) acf.addFlag('DQ.enableLumiAccess', True) acf.addFlag('DQ.FileKey', 'CombinedMonitoring') from PyUtils.moduleExists import moduleExists hlt_exists = moduleExists('TrigHLTMonitoring') acf.addFlag('DQ.useTrigger', hlt_exists) # temp thing for steering from inside old-style ... acf.addFlag('DQ.isReallyOldStyle', False) # computed acf.addFlag('DQ.Environment', getEnvironment) acf.addFlag('DQ.DataType', getDataType) # steering ... for flag in _steeringFlags + _lowLevelSteeringFlags: arg = True if flag == 'doJetTagMon': arg = lambda x: x.DQ.DataType != 'cosmics' # noqa: E731 acf.addFlag('DQ.Steering.' + flag, arg) # HLT steering ... from PyUtils.moduleExists import moduleExists if moduleExists('TrigHLTMonitoring'): from TrigHLTMonitoring.TrigHLTMonitorAlgorithm import createHLTDQConfigFlags acf.join(createHLTDQConfigFlags()) return acf
def createLArMonConfigFlags(): acf = AthConfigFlags() acf.addFlag('LArMon.LArDigitKey', 'FREE') acf.addFlag('LArMon.EventBlockSize', 0) # individual algos acf.addFlag('LArMon.doLArRawChannelMon', False) acf.addFlag('LArMon.doLArCollisionTimeMon', True) acf.addFlag('LArMon.doLArAffectedRegions', True) acf.addFlag('LArMon.doLArFEBMon', True) acf.addFlag('LArMon.doLArHVCorrectionMon', True) acf.addFlag('LArMon.doLArCosmicsMon', False) acf.addFlag('LArMon.doLArCoverage', True) acf.addFlag('LArMon.doLArDigitMon', True) acf.addFlag('LArMon.doLArNoisyROMon', True) acf.addFlag('LArMon.doLArRODMon', True) acf.addFlag('LArMon.doLArNoiseCorrelationMon', False) return acf
def createTriggerFlags(): flags = AthConfigFlags() # enables L1 simulation flags.addFlag('Trigger.doLVL1', lambda prevFlags: prevFlags.Input.isMC) # enables L1 topological trigger simulation flags.addFlag('Trigger.doL1Topo', True) # writes additional info from Topo simulation flags.addFlag('Trigger.writeL1TopoValData', True) # need proper documentation flags.addFlag('Trigger.useL1CaloCalibration', False) # need proper documentation flags.addFlag('Trigger.useRun1CaloEnergyScale', False) # enable HLT part of the trigger flags.addFlag('Trigger.doHLT', True) # changes decoding of L1 so that allways all configured chains are enabled, testing mode flags.addFlag("Trigger.L1Decoder.forceEnableAllChains", False) # Enable Run-3 LVL1 simulation and/or decoding flags.addFlag('Trigger.enableL1Phase1', False) # Enable usage of new L1 menu flags.addFlag('Trigger.readLVL1FromJSON', True) # Enable Run-2 L1Calo simulation and/or decoding (possible even if enablePhase1 is True) flags.addFlag('Trigger.enableL1CaloLegacy', True) # Enable Inner Detector flags.addFlag('Trigger.doID', True) # Enable muon system flags.addFlag('Trigger.doMuon', True) # Enable calorimeters flags.addFlag('Trigger.doCalo', True) # if 1, Run1 decoding version is set; if 2, Run2; if 3, Run 3 def EDMDecodingVersion(flags): log.debug("Attempting to determine EDMDecodingVersion.") version = 3 if flags.Input.Format == "BS": log.debug("EDMDecodingVersion: Input format is ByteStream") inputFileName = flags.Input.Files[0] if not inputFileName and flags.Common.isOnline(): log.debug( "EDMDecodingVersion: Online reconstruction, no input file. Return default version, i.e. AthenaMT." ) return version log.debug("EDMDecodingVersion: Checking ROD version.") import eformat from libpyeformat_helper import SubDetector bs = eformat.istream(inputFileName) rodVersionM = -1 rodVersionL = -1 # Find the first HLT ROBFragment in the first event for robf in bs[0]: if robf.rob_source_id().subdetector_id( ) == SubDetector.TDAQ_HLT: rodVersionM = robf.rod_minor_version() >> 8 rodVersionL = robf.rod_minor_version() & 0xFF log.debug( "EDMDecodingVersion: HLT ROD minor version from input file is {:d}.{:d}" .format(rodVersionM, rodVersionL)) break if rodVersionM >= 1: version = 3 return version log.info( "EDMDecodingVersion: Could not determine ROD version -- falling back to run-number-based determination" ) # Use run number to determine decoding version runNumber = flags.Input.RunNumber[0] log.debug( "EDMDecodingVersion: Read run number {}.".format(runNumber)) boundary_run12 = 230000 boundary_run23 = 368000 if runNumber <= 0: log.warning( "EDMDecodingVersion: Cannot determine decoding version because run number {} is invalid. Leaving the default version." .format(runNumber)) elif runNumber < boundary_run12: # Run-1 data version = 1 elif runNumber < boundary_run23: # Run-2 data version = 2 else: # Run-3 data version = 3 else: log.debug( "EDMDecodingVersion: Input format is POOL -- determine from input file collections." ) # POOL files: decide based on HLT output type present in file if "HLTResult_EF" in flags.Input.Collections: version = 1 elif "TrigNavigation" in flags.Input.Collections: version = 2 elif "HLTNav_Summary" in flags.Input.Collections: version = 3 elif flags.Input.Format == "POOL": # If running Trigger on RDO input (without previous trigger result), choose Run-3 version = 3 log.info("Determined EDMDecodingVersion to be {}.".format({ 1: "Run 1", 2: "Run 2", 3: "AthenaMT" }[version])) return version flags.addFlag('Trigger.EDMDecodingVersion', lambda prevFlags: EDMDecodingVersion(prevFlags)) # enables additional algorithms colecting MC truth infrmation (this is only used by IDso maybe we need Trigger.ID.doTruth only?) flags.addFlag('Trigger.doTruth', False) # only enable services for analysis and BS -> ESD processing (we need better name) flags.addFlag('Trigger.doTriggerConfigOnly', False) # Enables collection and export of detailed monitoring data of the HLT execution flags.addFlag('Trigger.CostMonitoring.doCostMonitoring', False) flags.addFlag('Trigger.CostMonitoring.chain', 'HLT_costmonitor_CostMonDS_L1All') flags.addFlag('Trigger.CostMonitoring.outputCollection', 'HLT_TrigCostContainer') flags.addFlag('Trigger.CostMonitoring.monitorAllEvents', False) # enable Bcm inputs simulation flags.addFlag('Trigger.L1.doBcm', True) # enable muon inputs simulation flags.addFlag('Trigger.L1.doMuons', True) # version of CTP data, int value up to 4 flags.addFlag('Trigger.L1.CTPVersion', 4) # list of thresholds (not sure if we want to use new flags to generate L1, leaving out for now?) # partition name used to determine online vs offline BS result writing import os flags.addFlag('Trigger.Online.partitionName', os.getenv('TDAQ_PARTITION') or '') # shortcut to check if job is running in a partition (i.e. partition name is not empty) flags.addFlag( 'Trigger.Online.isPartition', lambda prevFlags: len(prevFlags.Trigger.Online.partitionName) > 0) # write BS output file flags.addFlag('Trigger.writeBS', False) # Write transient BS before executing HLT algorithms (for running on MC RDO with clients which require BS inputs) flags.addFlag('Trigger.doTransientByteStream', False) # list of EDM objects to be written to AOD flags.addFlag('Trigger.AODEDMSet', 'AODSLIM') # list of objects to be written to ESD flags.addFlag('Trigger.ESDEDMSet', 'ESD') # tag to be used for condutions used by HLT code flags.addFlag('Trigger.OnlineCondTag', 'CONDBR2-HLTP-2018-01') # geometry version used by HLT online flags.addFlag('Trigger.OnlineGeoTag', 'ATLAS-R2-2016-01-00-01') # configuration tune for various years of Run2 (why string?) flags.addFlag('Trigger.run2Config', '2018') # comissionig options # one of: 'HltOnly', # 'Lvl1Only', # 'FullTrigger', # 'NoTrigger' flags.addFlag('Trigger.dataTakingConditions', 'FullTrigger') # use or not frontier proxies flags.addFlag('Trigger.triggerUseFrontier', False) # the configuration source # see https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerConfigFlag flags.addFlag('Trigger.triggerConfig', 'FILE') # name of the trigger menu flags.addFlag('Trigger.triggerMenuSetup', 'LS2_v1') # name of the trigger menu flags.addFlag('Trigger.generateMenuDiagnostics', False) # version of the menu from AthenaCommon.AppMgr import release_metadata flags.addFlag('Trigger.menuVersion', lambda prevFlags: release_metadata()['release']) # generate or not the HLT configuration flags.addFlag('Trigger.generateHLTMenu', False) # HLT XML file name flags.addFlag( 'Trigger.HLTMenuFile', lambda prevFlags: 'HLTMenu_' + prevFlags.Trigger .triggerMenuSetup + '_' + prevFlags.Trigger.menuVersion + '.xml') # generate or not the L1 configuration flags.addFlag('Trigger.generateL1Menu', False) def _deriveL1ConfigName(prevFlags): import re log = logging.getLogger('TrigConfigSvcCfg') pattern = re.compile(r'_v\d+|DC14') menuName = prevFlags.Trigger.triggerMenuSetup patternPos = pattern.search(menuName) if patternPos: menuName = menuName[:patternPos.end()] else: log.info( 'Can\'t find pattern to shorten menu name, either non-existent in name or not implemented.' ) return "LVL1config_" + menuName + "_" + prevFlags.Trigger.menuVersion + ".xml" # L1 XML file name flags.addFlag('Trigger.LVL1ConfigFile', _deriveL1ConfigName) # L1 Json file name flags.addFlag( 'Trigger.L1MenuFile', lambda prevFlags: 'L1Menu_' + prevFlags.Trigger. triggerMenuSetup + '_' + prevFlags.Trigger.menuVersion + '.json') # L1 topo XML file name def _deriveTopoConfigName(prevFlags): import re menuSetup = prevFlags.Trigger.triggerMenuSetup m = re.match(r'(.*v\d).*', menuSetup) if m: menuSetup = m.groups()[0] return "L1Topoconfig_" + menuSetup + "_" + prevFlags.Trigger.menuVersion + ".xml" flags.addFlag('Trigger.LVL1TopoConfigFile', _deriveTopoConfigName) # trigger reconstruction # enables the correction for pileup in cell energy calibration (should it be moved to some place where other calo flags are defined?) flags.addFlag('Trigger.calo.doOffsetCorrection', True) # helper to switch between versions def __tunes(default, ver2016, ver2017): from collections import defaultdict return lambda year: defaultdict(lambda: default, ( ('2016', ver2016), ('2017', ver2017)))[year] # Particle ID tune flags.addFlag( 'Trigger.egamma.pidVersion', lambda prevFlags: __tunes( default='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', ver2016='ElectronPhotonSelectorTools/trigger/rel21_mc16a/', ver2017='ElectronPhotonSelectorTools/trigger/rel21_20170214/') (prevFlags.Trigger.run2Config)) # cluster correction version, allowed value is: None or v12phiflip_noecorrnogap flags.addFlag( 'Trigger.egamma.clusterCorrectionVersion', lambda prevFlags: __tunes( default=None, ver2016=None, ver2017='v12phiflip_noecorrnogap') (prevFlags.Trigger.run2Config)) # tune of MVA flags.addFlag( 'Trigger.egamma.calibMVAVersion', lambda prevFlags: __tunes(default='egammaMVACalib/online/v3', ver2016='egammaMVACalib/online/v3', ver2017='egammaMVACalib/online/v6') (prevFlags.Trigger.run2Config)) # muons flags.addFlag('Trigger.muon.doEFRoIDrivenAccess', False) # muon offline reco flags varaint for trigger def __muon(): from MuonConfig.MuonConfigFlags import createMuonConfigFlags return createMuonConfigFlags() flags.addFlagsCategory('Trigger.Offline', __muon, prefix=True) from TriggerJobOpts.MenuConfigFlags import createMenuFlags flags.join(createMenuFlags()) return flags
def createMuonCombinedConfigFlags(): mcf = AthConfigFlags() # This is based on the following from the old configuration: # https://gitlab.cern.ch/atlas/athena/blob/release/22.0.8/Reconstruction/MuonIdentification/MuonCombinedRecExample/python/MuonCombinedRecFlags.py mcf.addFlag("MuonCombined.doCosmicSplitTracks", False) mcf.addFlag("MuonCombined.doMuGirl", True) mcf.addFlag("MuonCombined.doCombinedFit", True) mcf.addFlag("MuonCombined.doStatisticalCombination", True) mcf.addFlag("MuonCombined.doMuonSegmentTagger", True) # 'silicon-associated'muons, or muons which rely on special ID reconstruction because they're outside the usual acceptance. mcf.addFlag("MuonCombined.doSiAssocForwardMuons", True) # Switch on/off algorithms that make Muons for the CaloMuonCollection mcf.addFlag("MuonCombined.doCaloTrkMuId", True) # Switch on/off algorithms that make Muons for the MuGirlLowBetaMuonCollection mcf.addFlag("MuonCombined.doMuGirlLowBeta", lambda prevFlags: prevFlags.doMuGirl is True) return mcf
def createSimConfigFlags(): scf = AthConfigFlags() scf.addFlag("Sim.ParticleID", False) scf.addFlag("Sim.CalibrationRun", "DeadLAr") # "LAr", "Tile", "LAr+Tile", "DeadLAr", "Off" scf.addFlag( "Sim.CavernBG", False) #"Write" , "Read" , "Signal" , "WriteWorld" , "SignalWorld" scf.addFlag("Sim.ReadTR", False) scf.addFlag("Sim.WorldRRange", False) #12500. #int or float scf.addFlag("Sim.WorldZRange", False) #22031. #int or float # the G4 offset. It was never changed, so no need to peek in file scf.addFlag("Sim.SimBarcodeOffset", 200000) #for forward region scf.addFlag("Sim.TwissFileBeam1", False) scf.addFlag("Sim.TwissFileBeam2", False) scf.addFlag("Sim.TwissEnergy", 8000000.) scf.addFlag("Sim.TwissFileBeta", 550.) scf.addFlag("Sim.TwissFileNomReal", False) #"nominal","real" #default to one of these?! scf.addFlag("Sim.TwissFileVersion", "v01") #for G4AtlasAlg #in simflags scf.addFlag("Sim.ReleaseGeoModel", True) scf.addFlag("Sim.RecordFlux", False) scf.addFlag("Sim.TruthStrategy", "MC12") scf.addFlag("Sim.G4Commands", ["/run/verbose 2"]) #in atlasflags scf.addFlag("Sim.FlagAbortedEvents", False) scf.addFlag("Sim.KillAbortedEvents", True) scf.addFlag("Sim.IncludeParentsInG4Event", False) # Do full simulation + digitisation + reconstruction chain scf.addFlag("Sim.DoFullChain", False) scf.addFlag("Sim.G4Version", "geant4.10.1.patch03.atlas02") scf.addFlag("Sim.PhysicsList", "FTFP_BERT_ATL") scf.addFlag("Sim.NeutronTimeCut", 150.) # Sets the value for the neutron out of time cut in G4 scf.addFlag("Sim.NeutronEnergyCut", -1.) # Sets the value for the neutron energy cut in G4 scf.addFlag("Sim.ApplyEMCuts", False) # Turns on the G4 option to apply cuts for EM physics #For G4AtlasToolsConfig scf.addFlag("Sim.RecordStepInfo", False) scf.addFlag("Sim.StoppedParticleFile", False) scf.addFlag( "Sim.BeamPipeSimMode", "Normal" ) ## ["Normal", "FastSim", "EGammaRangeCuts", "EGammaPRangeCuts"] scf.addFlag( "Sim.LArParameterization", 2 ) ## 0 = No frozen showers, 1 = Frozen Showers, 2 = DeadMaterial Frozen Showers #For BeameffectsAlg scf.addFlag( "Sim.Vertex.Source", "CondDB" ) #"CondDB", "VertexOverrideEventFile.txt", "VertexOverride.txt","LongBeamspot" #for G4UserActions scf.addFlag("Sim.Layout", "ATLAS-R2-2015-03-01-00") scf.addFlag("Sim.NRRThreshold", False) scf.addFlag("Sim.NRRWeight", False) scf.addFlag("Sim.PRRThreshold", False) scf.addFlag("Sim.PRRWeight", False) # For G4FieldConfigNew scf.addFlag("Sim.G4Stepper", "AtlasRK4") scf.addFlag("Sim.G4EquationOfMotion", "") scf.addFlag("Sim.UsingGeant4", True) # for cosmics # volume(s) used to do cosmics filtering # G4 volume names from {"Muon", "Calo", "InnerDetector", "TRT_Barrel", "TRT_EC", "SCT_Barrel", "Pixel"} scf.addFlag("Sim.CosmicFilterVolumeNames", ["InnerDetector"]) scf.addFlag("Sim.CosmicFilterID", "13") # PDG ID to be filtered scf.addFlag("Sim.CosmicFilterPTmin", "5000") # min pT filtered in cosmics processing (MeV) scf.addFlag("Sim.CosmicFilterPTmax", "6000") # max pT filtered in cosmics processing (MeV) # For ISF scf.addFlag("Sim.ISFRun", False) scf.addFlag("Sim.ISF.HITSMergingRequired", { 'ID': True, 'CALO': True, 'MUON': True }) scf.addFlag("Sim.ISF.Simulator", "ATLFASTII") scf.addFlag("Sim.ISF.DoTimeMonitoring", True) # bool: run time monitoring scf.addFlag("Sim.ISF.DoMemoryMonitoring", True) # bool: run time monitoring scf.addFlag("Sim.ISF.ValidationMode", False) # bool: run ISF internal validation checks scf.addFlag("Sim.FastCalo.ParamsInputFilename", "FastCaloSim/MC16/TFCSparam_v011.root" ) # filename of the input parametrizations file scf.addFlag("Sim.FastCalo.CaloCellsName", "AllCalo") # StoreGate collection name for FastCaloSim hits scf.addFlag( "Sim.FastShower.InputCollection", "TruthEvent" ) # StoreGate collection name of modified TruthEvent for legayc FastCaloSim use # FastChain # Setting the BCID for Out-of-Time PU events, list of int scf.addFlag("Sim.FastChain.BCID", [1]) # weights for Out-of-Time PU events scf.addFlag("Sim.FastChain.PUWeights_lar_em", [1.0]) # LAr EM scf.addFlag("Sim.FastChain.PUWeights_lar_hec", [1.0]) # LAr HEC scf.addFlag("Sim.FastChain.PUWeights_lar_bapre", [1.0]) # LAr Barrel presampler scf.addFlag("Sim.FastChain.PUWeights_tile", [1.0]) # Tile # Fatras scf.addFlag("Sim.Fatras.RandomStreamName", "FatrasRnd") scf.addFlag("Sim.Fatras.G4RandomStreamName", "FatrasG4") scf.addFlag("Sim.Fatras.TrkExRandomStreamName", "TrkExRnd") # Fatras fine tuning scf.addFlag("Sim.Fatras.MomCutOffSec", 50.) # common momentum cut-off for secondaries scf.addFlag("Sim.Fatras.HadronIntProb", 1.) # hadronic interaction scale factor scf.addFlag("Sim.Fatras.GaussianMixtureModel", True) # use Gaussian mixture model for Multiple Scattering scf.addFlag("Sim.Fatras.BetheHeitlerScale", 1.) # scale to Bethe-Heitler contribution return scf
def createDetectorConfigFlags(): dcf=AthConfigFlags() #Detector.Geometry - merger of the old geometry and detdescr tasks dcf.addFlag('Detector.GeometryBpipe', False) dcf.addFlag('Detector.GeometryBCM', False) dcf.addFlag('Detector.GeometryDBM', False) dcf.addFlag('Detector.GeometryPixel', False) dcf.addFlag('Detector.GeometrySCT', False) dcf.addFlag('Detector.GeometryTRT', False) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.GeometryID', lambda prevFlags : (prevFlags.Detector.GeometryBCM or prevFlags.Detector.GeometryDBM or prevFlags.Detector.GeometryPixel or prevFlags.Detector.GeometrySCT or prevFlags.Detector.GeometryTRT)) #Upgrade ITk Inner Tracker is a separate and parallel detector dcf.addFlag('Detector.GeometryBCMPrime', False) dcf.addFlag('Detector.GeometryITkPixel', False) dcf.addFlag('Detector.GeometryITkStrip', False) dcf.addFlag('Detector.GeometryITk', lambda prevFlags : (prevFlags.Detector.GeometryBCMPrime or prevFlags.Detector.GeometryITkPixel or prevFlags.Detector.GeometryITkStrip)) dcf.addFlag('Detector.GeometryLAr', False) # Add separate em HEC and FCAL flags? dcf.addFlag('Detector.GeometryTile', False) dcf.addFlag('Detector.GeometryCalo', lambda prevFlags : (prevFlags.Detector.GeometryLAr or prevFlags.Detector.GeometryTile)) dcf.addFlag('Detector.GeometryCSC', lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('HasCSC',"True")) dcf.addFlag('Detector.GeometryMDT', False) dcf.addFlag('Detector.GeometryRPC', False) dcf.addFlag('Detector.GeometryTGC', False) dcf.addFlag('Detector.GeometrysTGC', lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('HasSTGC',"True")) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.GeometryMM', lambda prevFlags : GetDetDescrInfo(prevFlags.GeoModel.AtlasVersion).get('HasMM',"True")) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.GeometryMuon', lambda prevFlags : (prevFlags.Detector.GeometryCSC or prevFlags.Detector.GeometryMDT or prevFlags.Detector.GeometryRPC or prevFlags.Detector.GeometryTGC or prevFlags.Detector.GeometrysTGC or prevFlags.Detector.GeometryMM)) dcf.addFlag('Detector.GeometryLucid', False) dcf.addFlag('Detector.GeometryZDC', False) dcf.addFlag('Detector.GeometryALFA', False) dcf.addFlag('Detector.GeometryAFP', False) dcf.addFlag('Detector.GeometryFwdRegion',False) dcf.addFlag('Detector.GeometryForward',lambda prevFlags : (prevFlags.Detector.GeometryLucid or prevFlags.Detector.GeometryZDC or prevFlags.Detector.GeometryALFA or prevFlags.Detector.GeometryAFP or prevFlags.Detector.GeometryFwdRegion)) dcf.addFlag('Detector.GeometryCavern',False) dcf.addFlag('Detector.Geometry', lambda prevFlags : (prevFlags.Detector.GeometryBpipe or prevFlags.Detector.GeometryID or prevFlags.Detector.GeometryCalo or prevFlags.Detector.GeometryMuon or prevFlags.Detector.GeometryForward or prevFlags.Detector.GeometryCavern)) #Detector.Simulate dcf.addFlag('Detector.SimulateBpipe', False) dcf.addFlag('Detector.SimulateBCM', False) dcf.addFlag('Detector.SimulateDBM', False) dcf.addFlag('Detector.SimulatePixel', False) dcf.addFlag('Detector.SimulateSCT', False) dcf.addFlag('Detector.SimulateTRT', False) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.SimulateHGTD', False) dcf.addFlag('Detector.SimulateID', lambda prevFlags : (prevFlags.Detector.SimulateBCM or prevFlags.Detector.SimulateDBM or prevFlags.Detector.SimulatePixel or prevFlags.Detector.SimulateSCT or prevFlags.Detector.SimulateTRT)) #Upgrade ITk Inner Tracker is a separate and parallel detector dcf.addFlag('Detector.SimulateBCMPrime', False) dcf.addFlag('Detector.SimulateITkPixel', False) dcf.addFlag('Detector.SimulateITkStrip', False) dcf.addFlag('Detector.SimulateITk', lambda prevFlags : (prevFlags.Detector.SimulateBCMPrime or prevFlags.Detector.SimulateITkPixel or prevFlags.Detector.SimulateITkStrip or prevFlags.Detector.SimulateHGTD)) dcf.addFlag('Detector.SimulateLAr', False) # Add separate em HEC and FCAL flags? dcf.addFlag('Detector.SimulateTile', False) dcf.addFlag('Detector.SimulateCalo', lambda prevFlags : (prevFlags.Detector.SimulateLAr or prevFlags.Detector.SimulateTile)) dcf.addFlag('Detector.SimulateCSC', False) dcf.addFlag('Detector.SimulateMDT', False) dcf.addFlag('Detector.SimulateRPC', False) dcf.addFlag('Detector.SimulateTGC', False) dcf.addFlag('Detector.SimulatesTGC', False) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.SimulateMM', False) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.SimulateMuon', lambda prevFlags : (prevFlags.Detector.SimulateCSC or prevFlags.Detector.SimulateMDT or prevFlags.Detector.SimulateRPC or prevFlags.Detector.SimulateTGC or prevFlags.Detector.SimulatesTGC or prevFlags.Detector.SimulateMM)) dcf.addFlag('Detector.SimulateLucid', False) dcf.addFlag('Detector.SimulateZDC', False) dcf.addFlag('Detector.SimulateALFA', False) dcf.addFlag('Detector.SimulateAFP', False) dcf.addFlag('Detector.SimulateFwdRegion',False) dcf.addFlag('Detector.SimulateForward',lambda prevFlags : (prevFlags.Detector.SimulateLucid or prevFlags.Detector.SimulateZDC or prevFlags.Detector.SimulateALFA or prevFlags.Detector.SimulateAFP or prevFlags.Detector.SimulateFwdRegion)) dcf.addFlag('Detector.SimulateCavern',False) dcf.addFlag('Detector.Simulate', lambda prevFlags : (prevFlags.Detector.SimulateBpipe or prevFlags.Detector.SimulateID or prevFlags.Detector.SimulateCalo or prevFlags.Detector.SimulateMuon or prevFlags.Detector.SimulateForward or prevFlags.Detector.SimulateCavern)) #Detector.Overlay dcf.addFlag('Detector.OverlayBCM', False) dcf.addFlag('Detector.OverlayDBM', False) dcf.addFlag('Detector.OverlayPixel', False) dcf.addFlag('Detector.OverlaySCT', False) dcf.addFlag('Detector.OverlayTRT', False) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.OverlayID', lambda prevFlags : (prevFlags.Detector.OverlayBCM or prevFlags.Detector.OverlayDBM or prevFlags.Detector.OverlayPixel or prevFlags.Detector.OverlaySCT or prevFlags.Detector.OverlayTRT)) dcf.addFlag('Detector.OverlayBCMPrime', False) dcf.addFlag('Detector.OverlayITkPixel', False) dcf.addFlag('Detector.OverlayITkStrip', False) dcf.addFlag('Detector.OverlayITk', lambda prevFlags : (prevFlags.Detector.OverlayBCMPrime or prevFlags.Detector.OverlayITkPixel or prevFlags.Detector.OverlayITkStrip)) dcf.addFlag('Detector.OverlayLAr', False) # Add separate em HEC and FCAL flags? dcf.addFlag('Detector.OverlayTile', False) dcf.addFlag('Detector.OverlayCalo', lambda prevFlags : (prevFlags.Detector.OverlayLAr or prevFlags.Detector.OverlayTile)) dcf.addFlag('Detector.OverlayL1Calo',False) dcf.addFlag('Detector.OverlayCSC', False) dcf.addFlag('Detector.OverlayMDT', False) dcf.addFlag('Detector.OverlayRPC', False) dcf.addFlag('Detector.OverlayTGC', False) dcf.addFlag('Detector.OverlaysTGC', False) # Set default according to prevFlags.GeoModel.Run? dcf.addFlag('Detector.OverlayMM', False) # Set default according to prevFlags.GeoModel.Run? #Forward Detector Overlay not supported yet dcf.addFlag('Detector.OverlayMuon', lambda prevFlags : (prevFlags.Detector.OverlayCSC or prevFlags.Detector.OverlayMDT or prevFlags.Detector.OverlayRPC or prevFlags.Detector.OverlayTGC or prevFlags.Detector.OverlaysTGC or prevFlags.Detector.OverlayMM)) dcf.addFlag('Detector.Overlay', lambda prevFlags : (prevFlags.Detector.OverlayID or prevFlags.Detector.OverlayCalo or prevFlags.Detector.OverlayMuon)) dcf.addFlag('Detector.RecoBCM', False) dcf.addFlag('Detector.RecoIBL', lambda prevFlags : (prevFlags.Detector.RecoPixel and prevFlags.GeoModel.Run in ["RUN2", "RUN3"])) # TODO Review if a separate RecoIBL flag is really required here dcf.addFlag('Detector.RecoPixel', False) dcf.addFlag('Detector.RecoSCT', False) dcf.addFlag('Detector.RecoTRT', False) dcf.addFlag('Detector.RecoID', lambda prevFlags : (prevFlags.Detector.RecoBCM or prevFlags.Detector.RecoIBL or prevFlags.Detector.RecoPixel or prevFlags.Detector.RecoSCT or prevFlags.Detector.RecoTRT)) # dcf.addFlag('Detector.Reco', lambda prevFlags : (prevFlags.Detector.RecoID or prevFlags.Detector.RecoCalo or # prevFlags.Detector.RecoMuon)) dcf.addFlag('Detector.RecoITkPixel', False) dcf.addFlag('Detector.RecoITkStrip', False) dcf.addFlag('Detector.RecoBCMPrime', False) dcf.addFlag('Detector.RecoITk', lambda prevFlags : (prevFlags.Detector.RecoITkPixel or prevFlags.Detector.RecoITkStrip or prevFlags.Detector.RecoBCMPrime)) return dcf
def createGeoModelConfigFlags(): gcf = AthConfigFlags() gcf.addFlag('GeoModel.Layout', 'atlas') # replaces global.GeoLayout gcf.addFlag("GeoModel.AtlasVersion", lambda prevFlags: GetFileMD(prevFlags.Input.Files).get( "GeoAtlas", None) or "ATLAS-R2-2016-01-00-01") # gcf.addFlag( "GeoModel.Align.Dynamic", lambda prevFlags: (not prevFlags.Detector.Simulate and not prevFlags.Input.isMC)) gcf.addFlag("GeoModel.StripGeoType", lambda prevFlags: GetDetDescrInfo( prevFlags.GeoModel.AtlasVersion).get('StripGeoType', "GMX") ) # Based on CommonGeometryFlags.StripGeoType gcf.addFlag( "GeoModel.Run", lambda prevFlags: GetDetDescrInfo( prevFlags.GeoModel.AtlasVersion).get('Run', "RUN2") ) # Based on CommonGeometryFlags.Run (InDetGeometryFlags.isSLHC replaced by GeoModel.Run=="RUN4") gcf.addFlag("GeoModel.Type", lambda prevFlags: GetDetDescrInfo( prevFlags.GeoModel.AtlasVersion).get('GeoType', "UNDEFINED") ) # Geometry type in {ITKLoI, ITkLoI-VF, etc...} gcf.addFlag( "GeoModel.IBLLayout", lambda prevFlags: GetDetDescrInfo( prevFlags.GeoModel.AtlasVersion).get('IBLlayout', "UNDEFINED") ) # IBL layer layout in {"planar", "3D", "noIBL", "UNDEFINED"} return gcf
def createMenuFlags(): # this flags define which chains are in trgger menu # the flags content is not just the name bu contains a few key elements of the chains definition, like the seed, other chain aspects can be added # The DF/CF and hypos are then generated using the menu code # Should the HLT_ and L1_ prefixes are omitted (DRY principle)? # each flag is translated to an independent reconstruction chain flags = AthConfigFlags() #flags.addFlag('Trigger.menu.muons', []) flags.addFlag('Trigger.menu.muon', []) flags.addFlag('Trigger.menu.electron', []) flags.addFlag('Trigger.menu.photon', []) flags.addFlag('Trigger.menu.jet', []) flags.addFlag('Trigger.menu.combined', []) return flags
def createDigitizationCfgFlags(): """Return an AthConfigFlags object with required flags""" flags = AthConfigFlags() # Run Inner Detector noise simulation flags.addFlag("Digitization.DoInnerDetectorNoise", True) # Run pile-up digitization on one bunch crossing at a time? flags.addFlag("Digitization.DoXingByXingPileUp", False) # Run pile-up premixing flags.addFlag("Digitization.PileUpPremixing", False) # Special configuration read from flags.Input.Files flags.addFlag("Digitization.SpecialConfiguration", getSpecialConfiguration) # Run Calorimeter noise simulation flags.addFlag("Digitization.DoCaloNoise", True) # Compute and store DigiTruth information flags.addFlag("Digitization.DoDigiTruth", True) # Use high-gain Forward Calorimeters flags.addFlag("Digitization.HighGainFCal", False) # Use high-gain ElectroMagnetic EndCap Inner Wheel flags.addFlag("Digitization.HighGainEMECIW", True) # Do global pileup digitization flags.addFlag("Digitization.Pileup", True) # TRT Range cut used in simulation in mm. Should be 0.05 or 30. flags.addFlag("Digitization.TRTRangeCut", lambda prevFlags : float(GetFileMD(prevFlags.Input.Files).get('TRTRangeCut', 0.05))) # Write out truth information? flags.addFlag("Digitization.TruthOutput", False) # Write out calorimeter digits flags.addFlag("Digitization.AddCaloDigi", False) # Integer offset to random seed initialisation flags.addFlag("Digitization.RandomSeedOffset", 0) # Digitization extra input dependencies flags.addFlag("Digitization.ExtraInputs", [("xAOD::EventInfo", "EventInfo")]) return flags
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
def createCaloConfigFlags(): ccf=AthConfigFlags() #CaloNoise Flags ccf.addFlag("Calo.Noise.fixedLumiForNoise",-1) ccf.addFlag("Calo.Noise.useCaloNoiseLumi",True) #CaloCell flags ccf.addFlag("Calo.Cell.doPileupOffsetBCIDCorr", True) ccf.addFlag("Calo.Cell.doDeadCellCorr",True) ccf.addFlag("Calo.Cell.doPedestaCorr", lambda prevFlags: not prevFlags.Input.isMC) ccf.addFlag("Calo.Cell.doEnergyCorr",lambda prevFlags: not prevFlags.Input.isMC and not prevFlags.Common.isOnline) ccf.addFlag("Calo.Cell.doTimeCorr", lambda prevFlags: not prevFlags.Input.isMC and not prevFlags.Common.isOnline) #TopoCluster Flags: ccf.addFlag("Calo.TopoCluster.doTwoGaussianNoise",True) ccf.addFlag("Calo.TopoCluster.doTreatEnergyCutAsAbsolute",False) ccf.addFlag("Calo.TopoCluster.doTopoClusterLocalCalib",True) return ccf
def createPFConfigFlags(): pfConfigFlags = AthConfigFlags() pfConfigFlags.addFlag( "PF.EOverPMode", False ) #This defines whether we use the standard reconstruction or dedicated e/p mode used to measure e/p reference values pfConfigFlags.addFlag( "PF.addClusterMoments", True) #This defines whether we add the cluster moments to neutral PFO pfConfigFlags.addFlag( "PF.useClusterMoments", True ) #This defines whether we add a full list of cluster moments or not. Currently only the HLT config makes use of this flag, it is not used for offline config. pfConfigFlags.addFlag( "PF.useCalibHitTruthClusterMoments", False ) #This defines whether we calculate the calibration hit moments - only possible on if running from special calibraiton hit ESD samples. pfConfigFlags.addFlag( "PF.recoverIsolatedTracks", False ) #Defines whether we should apply the split shower recovery algorithm on isolated tracks pfConfigFlags.addFlag( "PF.useUpdated2015ChargedShowerSubtraction", True ) #Toggle whether to use updated 2015 charged shower subtraction, which disables the shower subtraction in high calorimeter energy density regions return pfConfigFlags
def createHLTDQConfigFlags(): from AthenaConfiguration.AthConfigFlags import AthConfigFlags acf = AthConfigFlags() acf.addFlag('DQ.Steering.HLT.doGeneral', True) acf.addFlag('DQ.Steering.HLT.doEgamma', True) acf.addFlag('DQ.Steering.HLT.doMET', True) acf.addFlag('DQ.Steering.HLT.doJet', True) acf.addFlag('DQ.Steering.HLT.doBjet', True) acf.addFlag('DQ.Steering.HLT.doCalo', True) acf.addFlag('DQ.Steering.HLT.doMuon', True) acf.addFlag('DQ.Steering.HLT.doBphys', True) acf.addFlag('DQ.Steering.HLT.doMinBias', True) acf.addFlag('DQ.Steering.HLT.doTau', True) return acf