Classes | |
class | CloneSequenceVisitor |
class | CloneTaskVisitor |
struct | CompositeCandidateMaker |
struct | CompositePtrCandidateMaker |
class | GatherAllModulesVisitor |
struct | MCTruthPairSelector |
struct | NamedCompositeCandidateMaker |
class | TestModuleCommand |
Functions | |
def | __labelsInSequence (process, sequenceLabel, postfix="", keepPostFix=False) |
def | _lineDiff (newString, oldString) |
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, verbose=False) |
def | cloneProcessingSnippetTask (process, task, postfix, removePostfix="", noClones=[], verbose=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="") |
def | testContains (self) |
def | testJetCollectionString (self) |
def | testListModules (self) |
|
private |
Definition at line 129 of file helpers.py.
References listModules(), and listSequences().
Referenced by removeIfInSequence().
|
private |
def helpers.addESProducers | ( | process, | |
config | |||
) |
Definition at line 32 of file helpers.py.
References DeadROC_duringRun.dir.
def helpers.addKeepStatement | ( | process, | |
oldKeep, | |||
newKeeps, | |||
verbose = False |
|||
) |
Add new keep statements to any PoolOutputModule of the process that has the old keep statements
Definition at line 354 of file helpers.py.
References print().
Referenced by customizeMiniAOD_MuEGFixMoriond2017.addDiscardedPFCandidates(), customizeMiniAOD_HcalFixLegacy2016.addDiscardedPFCandidates(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraPuppiMETCorrections(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), and customizeMiniAOD_MuEGFixMoriond2017.customizeAll().
def helpers.addToProcessAndTask | ( | label, | |
module, | |||
process, | |||
task | |||
) |
Definition at line 28 of file helpers.py.
Referenced by pfTools.addPFCandidates(), jetCollectionTools.GenJetAdder.addProcessAndTask(), jetCollectionTools.RecoJetAdder.addProcessAndTask(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), applyDeepBtagging_cff.applyDeepBtagging(), 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(), extraJets_MuEGFixMoriond2017.makeRecoJetCollection(), miniAOD_tools.miniAOD_customizeCommon(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), muonRecoMitigation.muonRecoMitigation(), nano_cff.nanoAOD_recalibrateMETs(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), pfTools.reconfigurePF2PATTaus(), extraJets_MuEGFixMoriond2017.reduceFinalJetCollection(), extraJets_MuEGFixMoriond2017.reduceInputJetCollection(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.runFixEE2017(), jetTools.setupBTagging(), jetTools.setupJetCorrections(), pfTools.switchToPFJets(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), trigTools.SwitchOnTrigger.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.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 114 of file helpers.py.
Referenced by pfTools.adaptPFMuons(), pfTools.addPFCandidates(), pfTools.reconfigurePF2PATTaus(), pfTools.switchToPFJets(), pfTools.switchToPFMET(), pfTools.tauTypeInPF2PAT(), and pfTools.usePF2PAT().
def helpers.associatePatAlgosToolsTask | ( | process | ) |
Definition at line 24 of file helpers.py.
References getPatAlgosToolsTask().
Referenced by ConfigBuilder.ConfigBuilder.prepare().
def helpers.cloneProcessingSnippet | ( | process, | |
sequence, | |||
postfix, | |||
removePostfix = "" , |
|||
noClones = [] , |
|||
addToTask = False , |
|||
verbose = 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 257 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.cloneProcessingSnippetTask | ( | process, | |
task, | |||
postfix, | |||
removePostfix = "" , |
|||
noClones = [] , |
|||
verbose = False |
|||
) |
------------------------------------------------------------------ copy a task plus the modules therein (including modules in subtasks) both are renamed by getting a postfix input tags are automatically adjusted ------------------------------------------------------------------
Definition at line 484 of file helpers.py.
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 241 of file helpers.py.
References spr.find().
Referenced by testContains().
def helpers.extendWithPrePostfix | ( | process, | |
other, | |||
prefix, | |||
postfix, | |||
loadedProducersAndFilters = None |
|||
) |
Look in other and find types which we can use
Definition at line 60 of file helpers.py.
References addToTask(), DeadROC_duringRun.dir, and MassReplace.massSearchReplaceAnyInputTag().
Referenced by loadWithPrePostfix().
def helpers.get_path | ( | file_in_path | ) |
def helpers.get_vars | ( | xml_path, | |
useFileInPath = True |
|||
) |
Definition at line 18 of file helpers.py.
References get_path(), and trainingvars.get_var_pset().
def helpers.getPatAlgosToolsTask | ( | process | ) |
Definition at line 13 of file helpers.py.
Referenced by customizeMiniAOD_MuEGFixMoriond2017.addBadMuonFilters(), customizeMiniAOD_MuEGFixMoriond2017.addDiscardedPFCandidates(), customizeMiniAOD_HcalFixLegacy2016.addDiscardedPFCandidates(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraPuppiMETCorrections(), pfTools.addPFCandidates(), jetCollectionTools.GenJetAdder.addProcessAndTask(), jetCollectionTools.RecoJetAdder.addProcessAndTask(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), applyDeepBtagging_cff.applyDeepBtagging(), applySubstructure_cff.applySubstructure(), associatePatAlgosToolsTask(), extraJets_MuEGFixMoriond2017.backupJetsFirstStep(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), customizeMiniAOD_MuEGFixMoriond2017.cleanPFCandidates(), customizeMiniAOD_HcalFixLegacy2016.cleanPfCandidates(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createShiftedModules(), eGammaCorrection.eGammaCorrection(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.extractMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getJetCollectionForCorsAndUncs(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getMETUncertainties(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), customizeMiniAOD_HcalFixLegacy2016.loadJetMETBTag(), 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(), muonRecoMitigation.muonRecoMitigation(), nano_cff.nanoAOD_recalibrateMETs(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), pfTools.reconfigurePF2PATTaus(), extraJets_MuEGFixMoriond2017.reduceFinalJetCollection(), extraJets_MuEGFixMoriond2017.reduceInputJetCollection(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.runFixEE2017(), jetTools.setupBTagging(), jetTools.setupJetCorrections(), pfTools.switchToPFJets(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddMETCollection.toolCode(), trigTools.SwitchOnTrigger.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.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 217 of file helpers.py.
References if().
Referenced by testJetCollectionString(), heavyIonTools.ProductionDefaults.toolCode(), coreTools.RemoveMCMatching.toolCode(), and heavyIonTools.SelectionDefaults.toolCode().
def helpers.listDependencyChain | ( | process, | |
module, | |||
sources, | |||
verbose = False |
|||
) |
Walk up the dependencies of a module to find any that depend on any of the listed sources
Definition at line 272 of file helpers.py.
References mps_setup.append, mps_monitormerge.items, and print().
Referenced by extraJets_MuEGFixMoriond2017.backupJetsFirstStep().
def helpers.listModules | ( | sequence | ) |
Definition at line 207 of file helpers.py.
Referenced by __labelsInSequence(), trigTools._modulesInPath(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.labelsInSequence(), and testListModules().
def helpers.listSequences | ( | sequence | ) |
Definition at line 212 of file helpers.py.
Referenced by __labelsInSequence(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.labelsInSequence().
def helpers.loadWithPostfix | ( | process, | |
moduleName, | |||
postfix = '' , |
|||
loadedProducersAndFilters = None |
|||
) |
Definition at line 46 of file helpers.py.
References loadWithPrePostfix().
Referenced by pfTools.usePF2PAT().
def helpers.loadWithPrefix | ( | process, | |
moduleName, | |||
prefix = '' , |
|||
loadedProducersAndFilters = None |
|||
) |
Definition at line 43 of file helpers.py.
References loadWithPrePostfix().
Referenced by jetTools.setupBTagging().
def helpers.loadWithPrePostfix | ( | process, | |
moduleName, | |||
prefix = '' , |
|||
postfix = '' , |
|||
loadedProducersAndFilters = None |
|||
) |
Definition at line 49 of file helpers.py.
References extendWithPrePostfix().
Referenced by loadWithPostfix(), and loadWithPrefix().
def helpers.removeIfInSequence | ( | process, | |
target, | |||
sequenceLabel, | |||
postfix = "" |
|||
) |
Definition at line 122 of file helpers.py.
References __labelsInSequence(), and MatrixUtil.remove().
def helpers.testContains | ( | self | ) |
def helpers.testJetCollectionString | ( | self | ) |
Definition at line 424 of file helpers.py.
References jetCollectionString().
def helpers.testListModules | ( | self | ) |