Skip to content

Adds 'AsgIntValueSelectionTool' tool

Miha Muskinja requested to merge mmuskinj/athena:21.2-AsgEnumSelectionTool into 21.2

Similar to the AsgFlagSelectionTool, but used to select int-type flags. Takes exactly one flag with a list of accepted enumes as input and checks the corresponding decision.

Example usage:

    alg = createAlgorithm('CP::AsgSelectionAlg', 'JetIsBtagTruthSelectionAlg'+postfix)
    alg.preselection = 'kinematicSelection,as_char'
    addPrivateTool(alg, 'selectionTool', 'CP::AsgIntValueSelectionTool')
    alg.selectionTool.selectionFlag = 'HadronConeExclTruthLabelID'
    alg.selectionTool.selectionEnums = [5]
    alg.selectionDecoration = 'IsBjet,as_char'
    seq.append(alg, inputPropName='particles',
               stageName='selection')
Edited by Tadej Novak

Merge request reports