11 def IP3DTagCfg( flags, name = 'IP3DTag', PrimaryVertexCollectionName="", scheme = '', useBTagFlagsDefaults = True,FlipOption='STANDARD', **options ):
12 """Sets up a IP3DTag tool and returns it.
14 The following options have BTaggingFlags defaults:
16 Runmodus default: BTagging.RunModus
17 referenceType default: BTagging.ReferenceType
18 impactParameterView default: "3D"
19 trackGradePartitions default: [ "Good", "BlaShared", "PixShared", "SctShared", "0HitBLayer" ]
20 RejectBadTracks default: False
21 jetCollectionList default: BTaggingFlags.Jets
22 unbiasIPEstimation default: False (switch to true (better!) when creating new PDFs)
23 SecVxFinderName default: "SV1"
24 UseCHypo default: True
26 input: name: The name of the tool (should be unique).
27 useBTagFlagsDefaults : Whether to use BTaggingFlags defaults for options that are not specified.
28 **options: Python dictionary with options for the tool.
29 output: The actual tool."""
31 options[
'name'] = name
32 options[
'xAODBaseName'] =
'IP3D'
33 options[
'trackAssociationName'] =
'BTagTrackToJetAssociator'
35 if useBTagFlagsDefaults:
39 trackSelectorTool = acc.popToolsAndMerge(
IPTrackSelectorCfg(flags,
'IP3DTrackSelector'))
40 likelihood = acc.popToolsAndMerge(
NewLikelihoodToolCfg(flags,
'IP3DNewLikelihoodTool',
'IP3D', scheme))
42 defaults = {
'Runmodus' : flags.BTagging.RunModus,
43 'referenceType' : flags.BTagging.ReferenceType,
44 'jetPtMinRef' : flags.BTagging.JetPtMinRef,
45 'impactParameterView' :
'3D',
46 'trackGradePartitions' : flags.BTagging.Grades,
47 'RejectBadTracks' :
True,
48 'jetCollectionList' : [],
49 'unbiasIPEstimation' :
False,
51 'SecVxFinderName' :
'SV1',
52 'storeTrackParticles':
True,
53 'storeTrackParameters':
True,
54 'storeIpValues':
True,
55 'LikelihoodTool' : likelihood,
56 'trackSelectorTool' : trackSelectorTool,
57 'SVForIPTool' : svForIPTool,
58 'trackGradeFactory' : trackGradeFactory,
59 'TrackToVertexIPEstimator' : trackToVertexIPEstimator,
61 for option
in defaults:
62 options.setdefault(option, defaults[option])
67 if FlipOption==
'NEGATIVE_IP_ONLY':
79 nameNeg=name.replace(
"Tag",
"NegTag")
82 options[
'name'] = nameNeg
83 options[
'xAODBaseName'] =
'IP3DNeg'
84 for option
in negtagoptions:
85 options.setdefault(option, negtagoptions[option])
87 elif FlipOption==
'FLIP_SIGN':
98 nameFlip=name.replace(
"Tag",
"FlipTag")
101 options[
'name'] = nameFlip
102 options[
'xAODBaseName'] =
'IP3DFlip'
103 for option
in fliptagoptions:
104 options.setdefault(option, fliptagoptions[option])
107 acc.setPrivateTools(CompFactory.Analysis.IPTag( **options))