Classes | |
class | CloneSequenceVisitor |
struct | CompositeCandidateMaker |
struct | CompositePtrCandidateMaker |
class | GatherAllModulesVisitor |
struct | MCTruthPairSelector |
struct | NamedCompositeCandidateMaker |
class | TestModuleCommand |
Functions | |
def | __labelsInSequence (process, sequenceLabel, postfix="", keepPostFix=False) |
def | addESProducers (process, config) |
def | addKeepStatement (process, oldKeep, newKeeps, verbose=False) |
def | addToProcessAndTask (label, module, process, task) |
def | addToTask (loadedProducersAndFilters, module) |
def | applyPostfix (process, label, postfix) |
def | associatePatAlgosToolsTask (process) |
def | cloneProcessingSnippet (process, sequence, postfix, removePostfix="", noClones=[], addToTask=False) |
def | contains (sequence, moduleName) |
def | extendWithPrePostfix (process, other, prefix, postfix, loadedProducersAndFilters=None) |
def | get_path (file_in_path) |
def | get_vars (xml_path, useFileInPath=True) |
def | getPatAlgosToolsTask (process) |
def | jetCollectionString (prefix='', algo='', type='') |
def | listDependencyChain (process, module, sources, verbose=False) |
def | listModules (sequence) |
def | listSequences (sequence) |
def | loadWithPostfix (process, moduleName, postfix='', loadedProducersAndFilters=None) |
def | loadWithPrefix (process, moduleName, prefix='', loadedProducersAndFilters=None) |
def | loadWithPrePostfix (process, moduleName, prefix='', postfix='', loadedProducersAndFilters=None) |
def | removeIfInSequence (process, target, sequenceLabel, postfix="") |
|
private |
Definition at line 128 of file helpers.py.
References listModules(), and listSequences().
Referenced by removeIfInSequence().
def helpers.addESProducers | ( | process, | |
config | |||
) |
Definition at line 31 of file helpers.py.
References dir.
Add new keep statements to any PoolOutputModule of the process that has the old keep statements
Definition at line 352 of file helpers.py.
Referenced by customizeMiniAOD_MuEGFixMoriond2017.addDiscardedPFCandidates(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraPuppiMETCorrections(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), and customizeMiniAOD_MuEGFixMoriond2017.customizeAll().
def helpers.addToProcessAndTask | ( | label, | |
module, | |||
process, | |||
task | |||
) |
Definition at line 27 of file helpers.py.
Referenced by pfTools.addPFCandidates(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), applySubstructure_cff.applySubstructure(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createShiftedModules(), eGammaCorrection.eGammaCorrection(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.extractMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getJetCollectionForCorsAndUncs(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getMETUncertainties(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), egmIsolationsPUPPI_cfi.makeInputForPUPPIIsolationEgm(), muonIsolationsPUPPI_cfi.makeInputForPUPPIIsolationMuon(), puppiForMET_cff.makePuppies(), puppiForMET_cff.makePuppiesFromMiniAOD(), extraJets_MuEGFixMoriond2017.makeRecoJetCollection(), miniAOD_tools.miniAOD_customizeCommon(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfigurationPre(), muonRecoMitigation.muonRecoMitigation(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), pfTools.reconfigurePF2PATTaus(), extraJets_MuEGFixMoriond2017.reduceFinalJetCollection(), extraJets_MuEGFixMoriond2017.reduceInputJetCollection(), jetTools.setupBTagging(), jetTools.setupJetCorrections(), pfTools.switchToPFJets(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), trigTools.SwitchOnTrigger.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), jetTools.AddJetCollection.toolCode(), jetTools.UpdateJetCollection.toolCode(), jetTools.AddJetID.toolCode(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.updateJECs().
def helpers.addToTask | ( | loadedProducersAndFilters, | |
module | |||
) |
def helpers.applyPostfix | ( | process, | |
label, | |||
postfix | |||
) |
Definition at line 113 of file helpers.py.
Referenced by pfTools.adaptPFMuons(), pfTools.addPFCandidates(), pfTools.reconfigurePF2PATTaus(), pfTools.switchToPFJets(), pfTools.switchToPFMET(), pfTools.tauTypeInPF2PAT(), HiCoreTools.RemoveMCMatching.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), and pfTools.usePF2PAT().
def helpers.associatePatAlgosToolsTask | ( | process | ) |
Definition at line 23 of file helpers.py.
References getPatAlgosToolsTask().
Referenced by ConfigBuilder.ConfigBuilder.prepare().
def helpers.cloneProcessingSnippet | ( | process, | |
sequence, | |||
postfix, | |||
removePostfix = "" , |
|||
noClones = [] , |
|||
addToTask = False |
|||
) |
------------------------------------------------------------------ copy a sequence plus the modules and sequences therein both are renamed by getting a postfix input tags are automatically adjusted ------------------------------------------------------------------
Definition at line 255 of file helpers.py.
Referenced by boostedHPSPFTaus_cfi.addBoostedTaus(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), extraJets_MuEGFixMoriond2017.backupJetsFirstStep(), extraJets_MuEGFixMoriond2017.makeRecoJetCollection(), pfIsolation.setupPFIso(), and pfIsolation.setupPFIsoPhoton().
def helpers.contains | ( | sequence, | |
moduleName | |||
) |
------------------------------------------------------------------ return True if a module with name 'module' is contained in the sequence with name 'sequence' and False otherwise. This version is not so nice as it also returns True for any substr of the name of a contained module. sequence : sequence [e.g. process.patDefaultSequence] module : module name as a string ------------------------------------------------------------------
Definition at line 239 of file helpers.py.
References spr.find().
Referenced by helpers.TestModuleCommand.testContains().
def helpers.extendWithPrePostfix | ( | process, | |
other, | |||
prefix, | |||
postfix, | |||
loadedProducersAndFilters = None |
|||
) |
Look in other and find types which we can use
Definition at line 59 of file helpers.py.
References addToTask(), dir, and MassReplace.massSearchReplaceAnyInputTag().
Referenced by loadWithPrePostfix().
def helpers.get_path | ( | file_in_path | ) |
Definition at line 18 of file helpers.py.
References get_path(), and trainingvars.get_var_pset().
def helpers.getPatAlgosToolsTask | ( | process | ) |
Definition at line 12 of file helpers.py.
Referenced by customizeMiniAOD_MuEGFixMoriond2017.addBadMuonFilters(), customizeMiniAOD_MuEGFixMoriond2017.addDiscardedPFCandidates(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraPuppiMETCorrections(), pfTools.addPFCandidates(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), applySubstructure_cff.applySubstructure(), associatePatAlgosToolsTask(), extraJets_MuEGFixMoriond2017.backupJetsFirstStep(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), customizeMiniAOD_MuEGFixMoriond2017.cleanPFCandidates(), CompactSkim_cff.CompactSkim(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createShiftedModules(), eGammaCorrection.eGammaCorrection(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.extractMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getJetCollectionForCorsAndUncs(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getMETUncertainties(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), customizeMiniAOD_MuEGFixMoriond2017.loadJetMETBTag(), egmIsolationsPUPPI_cfi.makeInputForPUPPIIsolationEgm(), muonIsolationsPUPPI_cfi.makeInputForPUPPIIsolationMuon(), puppiForMET_cff.makePuppies(), puppiForMET_cff.makePuppiesFromMiniAOD(), extraJets_MuEGFixMoriond2017.makeRecoJetCollection(), miniAOD_tools.miniAOD_customizeCommon(), miniAOD_tools.miniAOD_customizeData(), miniAOD_tools.miniAOD_customizeMC(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfigurationPre(), muonRecoMitigation.muonRecoMitigation(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), pfTools.reconfigurePF2PATTaus(), extraJets_MuEGFixMoriond2017.reduceFinalJetCollection(), extraJets_MuEGFixMoriond2017.reduceInputJetCollection(), jetTools.setupBTagging(), jetTools.setupJetCorrections(), pfTools.switchToPFJets(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), trigTools.SwitchOnTrigger.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), jetTools.AddJetCollection.toolCode(), jetTools.UpdateJetCollection.toolCode(), jetTools.AddJetID.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.updateJECs(), and pfTools.usePF2PAT().
def helpers.jetCollectionString | ( | prefix = '' , |
|
algo = '' , |
|||
type = '' |
|||
) |
------------------------------------------------------------------ return the string of the jet collection module depending on the input vaules. The default return value will be 'patAK5CaloJets'. algo : indicating the algorithm type of the jet [expected are 'AK5', 'IC5', 'SC7', ...] type : indicating the type of constituents of the jet [expec- ted are 'Calo', 'PFlow', 'JPT', ...] prefix : prefix indicating the type of pat collection module (ex- pected are '', 'selected', 'clean'). ------------------------------------------------------------------
Definition at line 215 of file helpers.py.
References reco.if().
Referenced by helpers.TestModuleCommand.testJetCollectionString(), heavyIonTools.ProductionDefaults.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), coreTools.RemoveMCMatching.toolCode(), heavyIonTools.SelectionDefaults.toolCode(), and HiCoreTools.RemoveSpecificPATObjects.toolCode().
Walk up the dependencies of a module to find any that depend on any of the listed sources
Definition at line 270 of file helpers.py.
References mps_setup.append.
Referenced by extraJets_MuEGFixMoriond2017.backupJetsFirstStep().
def helpers.listModules | ( | sequence | ) |
Definition at line 205 of file helpers.py.
Referenced by __labelsInSequence(), trigTools._modulesInPath(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.labelsInSequence(), helpers.TestModuleCommand.testListModules(), HiCoreTools.RemoveCleaning.toolCode(), and HiCoreTools.AddCleaning.toolCode().
def helpers.listSequences | ( | sequence | ) |
Definition at line 210 of file helpers.py.
Referenced by __labelsInSequence(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.labelsInSequence().
Definition at line 45 of file helpers.py.
References loadWithPrePostfix().
Referenced by pfTools.usePF2PAT().
Definition at line 42 of file helpers.py.
References loadWithPrePostfix().
Referenced by jetTools.setupBTagging().
def helpers.loadWithPrePostfix | ( | process, | |
moduleName, | |||
prefix = '' , |
|||
postfix = '' , |
|||
loadedProducersAndFilters = None |
|||
) |
Definition at line 48 of file helpers.py.
References extendWithPrePostfix().
Referenced by loadWithPostfix(), and loadWithPrefix().
def helpers.removeIfInSequence | ( | process, | |
target, | |||
sequenceLabel, | |||
postfix = "" |
|||
) |
Definition at line 121 of file helpers.py.
References __labelsInSequence(), and MatrixUtil.remove().
Referenced by HiCoreTools.RemoveSpecificPATObjects.toolCode().