예제 #1
0
def toolSV1FlipTag(name, useBTagFlagsDefaults=True, **options):
    """Sets up a SV1FlipTag tool and returns it.

    The following options have BTaggingFlags defaults:

    OutputLevel                         default: BTaggingFlags.OutputLevel
    Runmodus                            default: BTaggingFlags.Runmodus
    referenceType                       default: BTaggingFlags.ReferenceType
    SVAlgType                           default: "SV1"
    jetCollectionList                   default: BTaggingFlags.Jets
    SecVxFinderName                     default: "SV1Flip"
    LikelihoodTool                      default: None
    UseCHypo                            default: True

    input:             name: The name of the tool (should be unique).
      useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
                  **options: Python dictionary with options for the tool.
    output: The actual tool, which can then by added to ToolSvc via ToolSvc += output."""
    if useBTagFlagsDefaults:
        defaults = {
            'OutputLevel': BTaggingFlags.OutputLevel,
            'Runmodus': BTaggingFlags.Runmodus,
            'referenceType': BTaggingFlags.ReferenceType,
            'SVAlgType': 'SV1',
            'jetCollectionList': BTaggingFlags.Jets,
            #                     'originalTPCollectionName'         : BTaggingFlags.TrackParticleCollectionName,
            'SecVxFinderName': 'SV1Flip',
            'LikelihoodTool': None,
            'UseCHypo': True,
        }
        for option in defaults:
            options.setdefault(option, defaults[option])
    options['name'] = name
    from JetTagTools.JetTagToolsConf import Analysis__SVTag
    return Analysis__SVTag(**options)
예제 #2
0
from JetTagTools.JetTagToolsConf import Analysis__SVTag
SV0TagTool = Analysis__SVTag(name="SV0Tag",
                             Runmodus=BTaggingFlags.Runmodus,
                             referenceType=BTaggingFlags.ReferenceType,
                             SVAlgType="SV0",
                             SecVxFinderName="SV0",
                             xAODBaseName="SV0",
                             OutputLevel=BTaggingFlags.OutputLevel,
                             jetCollectionList=BTaggingFlags.Jets)
ToolSvc += SV0TagTool
if BTaggingFlags.OutputLevel < 3:
    print SV0TagTool
예제 #3
0
if BTaggingFlags.Runmodus == 'analysis':
    # each tagger needs own instance, can't be shared!
    from JetTagTools.JetTagToolsConf import Analysis__NewLikelihoodTool
    SV2FlipNewLikelihood = Analysis__NewLikelihoodTool(
        name="SV2FlipNewLikelihoodTool",
        OutputLevel=BTaggingFlags.OutputLevel,
        taggerName="SV2",
        calibrationTool=BTagCalibrationBrokerTool)
    ToolSvc += SV2FlipNewLikelihood
    if BTaggingFlags.OutputLevel < 3:
        print SV2FlipNewLikelihood
else:
    SV2FlipNewLikelihood = None

from JetTagTools.JetTagToolsConf import Analysis__SVTag
SV2FlipTagTool = Analysis__SVTag(
    name="SV2FlipTag",
    Runmodus=BTaggingFlags.Runmodus,
    referenceType=BTaggingFlags.ReferenceType,
    SVAlgType="SV2",
    SecVxFinderName="InDetVKalVxNegativeTagInJetTool",
    OutputLevel=BTaggingFlags.OutputLevel,
    LikelihoodTool=SV2FlipNewLikelihood,
    jetCollectionList=BTaggingFlags.Jets,
    writeInfoPlus=False,
    jetWithInfoPlus=BTaggingFlags.JetsWithInfoPlus,
    originalTPCollectionName=BTaggingFlags.TrackParticleCollectionName)
ToolSvc += SV2FlipTagTool
if BTaggingFlags.OutputLevel < 3:
    print SV2FlipTagTool
예제 #4
0
if BTaggingFlags.Runmodus == 'analysis':
    # each tagger needs own instance, can't be shared!
    from JetTagTools.JetTagToolsConf import Analysis__NewLikelihoodTool
    SV1NewLikelihood = Analysis__NewLikelihoodTool(
        name="SV1NewLikelihoodTool",
        OutputLevel=BTaggingFlags.OutputLevel,
        taggerName="SV1",
        calibrationTool=BTagCalibrationBrokerTool)
    ToolSvc += SV1NewLikelihood
    if BTaggingFlags.OutputLevel < 3:
        print SV1NewLikelihood
else:
    SV1NewLikelihood = None

from JetTagTools.JetTagToolsConf import Analysis__SVTag
SV1TagTool = Analysis__SVTag(name="SV1Tag",
                             Runmodus=BTaggingFlags.Runmodus,
                             referenceType=BTaggingFlags.ReferenceType,
                             SVAlgType="SV1",
                             xAODBaseName="SV1",
                             SecVxFinderName="SV1",
                             OutputLevel=BTaggingFlags.OutputLevel,
                             LikelihoodTool=SV1NewLikelihood,
                             jetCollectionList=BTaggingFlags.Jets,
                             UseCHypo=True)
ToolSvc += SV1TagTool
if BTaggingFlags.OutputLevel < 3:
    print SV1TagTool