Classes | |
class | CloneSequenceVisitor |
struct | CompositeCandidateMaker |
struct | CompositePtrCandidateMaker |
class | GatherAllModulesVisitor |
class | MassSearchParamVisitor |
class | MassSearchReplaceAnyInputTagVisitor |
class | MassSearchReplaceParamVisitor |
struct | MCTruthPairSelector |
struct | NamedCompositeCandidateMaker |
class | TestModuleCommand |
Functions | |
def | __labelsInSequence |
def | applyPostfix |
Helpers to perform some technically boring tasks like looking for all modules with a given parameter and replacing that to a given value. More... | |
def | cloneProcessingSnippet |
def | contains |
def | jetCollectionString |
def | listModules |
def | listSequences |
def | massSearchReplaceAnyInputTag |
def | massSearchReplaceParam |
def | removeIfInSequence |
|
private |
Definition at line 27 of file helpers.py.
References listModules(), and listSequences().
Referenced by applyPostfix(), and removeIfInSequence().
def helpers.applyPostfix | ( | process, | |
label, | |||
postfix | |||
) |
Helpers to perform some technically boring tasks like looking for all modules with a given parameter and replacing that to a given value.
If a module is in patDefaultSequence use the cloned module. Will crash if patDefaultSequence has not been cloned with 'postfix' beforehand
Definition at line 6 of file helpers.py.
References __labelsInSequence().
Referenced by tauTools._switchToPFTau(), pfTools.adaptPFMuons(), pfTools.adaptPFTaus(), pfTools.addPFCandidates(), pfTools.reconfigurePF2PATTaus(), tauTools.redoPFTauDiscriminators(), tauTools.switchToCaloTau(), pfTools.switchToPFJets(), pfTools.switchToPFMET(), pfTools.tauTypeInPF2PAT(), HiCoreTools.RemoveMCMatching.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), coreTools.RemoveSpecificPATObjects.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), coreTools.RemoveCleaning.toolCode(), jetTools.SwitchJetCollection.toolCode(), pfTools.useGsfElectrons(), pfTools.usePF2PAT(), pfTools.usePFIso(), and jetTools.SwitchJetCollection.vit().
def helpers.cloneProcessingSnippet | ( | process, | |
sequence, | |||
postfix | |||
) |
------------------------------------------------------------------ copy a sequence plus the modules and sequences therein both are renamed by getting a postfix input tags are automatically adjusted ------------------------------------------------------------------
Definition at line 262 of file helpers.py.
Referenced by pfTools.reconfigurePF2PATTaus(), tauTools.redoPFTauDiscriminators(), pfIsolation.setupPFIso(), pfIsolation.setupPFIsoPhoton(), pfTools.switchToPFMET(), and pfTools.usePF2PAT().
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 246 of file helpers.py.
References spr.find().
Referenced by helpers.TestModuleCommand.testContains().
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 222 of file helpers.py.
References if().
Referenced by helpers.TestModuleCommand.testJetCollectionString(), heavyIonTools.ProductionDefaults.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), heavyIonTools.SelectionDefaults.toolCode(), coreTools.RemoveMCMatching.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), coreTools.RemoveSpecificPATObjects.toolCode(), and jetTools.AddJetCollection.toolCode().
def helpers.listModules | ( | sequence | ) |
Definition at line 208 of file helpers.py.
Referenced by __labelsInSequence(), trigTools._modulesInSequence(), jetTools.RunBTagging.apply(), helpers.TestModuleCommand.testListModules(), coreTools.RemoveSpecificPATObjects.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), HiCoreTools.AddCleaning.toolCode(), coreTools.RemoveCleaning.toolCode(), and coreTools.AddCleaning.toolCode().
def helpers.listSequences | ( | sequence | ) |
Definition at line 213 of file helpers.py.
Referenced by __labelsInSequence(), jetTools.RunBTagging.apply(), and coreTools.RemoveSpecificPATObjects.toolCode().
def helpers.massSearchReplaceAnyInputTag | ( | sequence, | |
oldInputTag, | |||
newInputTag, | |||
verbose = False , |
|||
moduleLabelOnly = False |
|||
) |
Replace InputTag oldInputTag with newInputTag, at any level of nesting within PSets, VPSets, VInputTags...
Definition at line 218 of file helpers.py.
Referenced by patMuonsWithTrigger_cff.changeRecoMuonInput(), helpers.CloneSequenceVisitor.clonedSequence(), ConfigBuilder.MassReplaceInputTag(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), helpers.TestModuleCommand.testMassSearchReplaceAnyInputTag(), and patMuonsWithTrigger_cff.useExistingPATMuons().
def helpers.massSearchReplaceParam | ( | sequence, | |
paramName, | |||
paramOldValue, | |||
paramValue, | |||
verbose = False |
|||
) |
Definition at line 205 of file helpers.py.
Referenced by pfTools.reconfigurePF2PATTaus(), tauTools.redoPFTauDiscriminators(), and helpers.TestModuleCommand.testMassSearchReplaceParam().
def helpers.removeIfInSequence | ( | process, | |
target, | |||
sequenceLabel, | |||
postfix = "" |
|||
) |
Definition at line 20 of file helpers.py.
References __labelsInSequence(), and python.multivaluedict.remove().
Referenced by pfTools.adaptPFElectrons(), jetTools.RunBTagging.apply(), pfTools.removeMCMatchingPF2PAT(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), coreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), pfTools.usePF2PAT(), and jetTools.SwitchJetCollection.vit().