5 '''@file InDetMatchingConfig.py
8 @brief CA-based python configurations for matching tools in this package
11 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
12 from AthenaConfiguration.ComponentFactory
import CompFactory
13 from AthenaCommon.Logging
import logging
18 Tool for Track->Truth matching via DeltaR (and/or pT resolution)
22 kwargs.setdefault(
"dRmax", flags.PhysVal.IDTPM.currentTrkAna.dRmax )
23 kwargs.setdefault(
"pTResMax", flags.PhysVal.IDTPM.currentTrkAna.pTResMax )
26 CompFactory.IDTPM.DeltaRMatchingTool_trkTruth( name, **kwargs ) )
32 Tool for Truth->Track matching via DeltaR (and/or pT resolution)
36 kwargs.setdefault(
"dRmax", flags.PhysVal.IDTPM.currentTrkAna.dRmax )
37 kwargs.setdefault(
"pTResMax", flags.PhysVal.IDTPM.currentTrkAna.pTResMax )
40 CompFactory.IDTPM.DeltaRMatchingTool_truthTrk( name, **kwargs ) )
46 Tool for Track->Track matching via DeltaR (and/or pT resolution)
50 kwargs.setdefault(
"dRmax", flags.PhysVal.IDTPM.currentTrkAna.dRmax )
51 kwargs.setdefault(
"pTResMax", flags.PhysVal.IDTPM.currentTrkAna.pTResMax )
54 CompFactory.IDTPM.DeltaRMatchingTool_trk( name, **kwargs ) )
60 Tool for Track->Truth matching via 'truthParticleLink' decorations
64 kwargs.setdefault(
"MatchingTruthProb", flags.PhysVal.IDTPM.currentTrkAna.truthProbCut )
67 CompFactory.IDTPM.TrackTruthMatchingTool( name, **kwargs ) )
73 Tool for Truth->Track matching via 'truthParticleLink' decorations
77 kwargs.setdefault(
"MatchingTruthProb", flags.PhysVal.IDTPM.currentTrkAna.truthProbCut )
80 CompFactory.IDTPM.TruthTrackMatchingTool( name, **kwargs ) )
86 Tool for Track->Truth matching via 'truthParticleLink' decorations
90 kwargs.setdefault(
"MatchingTruthProb", flags.PhysVal.IDTPM.currentTrkAna.truthProbCut )
93 CompFactory.IDTPM.EFTrackMatchingTool( name, **kwargs ) )
99 CA-based configuration for the test-reference matching Tool
101 log = logging.getLogger(
"TrackMatchingToolCfg" )
104 if flags.PhysVal.IDTPM.currentTrkAna.MatchingType ==
"DeltaRMatch":
107 if "Truth" in flags.PhysVal.IDTPM.currentTrkAna.RefType :
109 flags, name =
"DeltaRMatchingTool_trkTruth" +
110 flags.PhysVal.IDTPM.currentTrkAna.anaTag, **kwargs )
113 if "Truth" in flags.PhysVal.IDTPM.currentTrkAna.TestType :
115 flags, name =
"DeltaRMatchingTool_truthTrk" +
116 flags.PhysVal.IDTPM.currentTrkAna.anaTag, **kwargs )
120 flags, name=
"DeltaRMatchingTool_trk" +
121 flags.PhysVal.IDTPM.currentTrkAna.anaTag, **kwargs )
124 if flags.PhysVal.IDTPM.currentTrkAna.MatchingType ==
"TruthMatch":
127 if "Truth" in flags.PhysVal.IDTPM.currentTrkAna.RefType :
129 flags, name=
"TrackTruthMatchingTool" +
130 flags.PhysVal.IDTPM.currentTrkAna.anaTag, **kwargs )
133 if "Truth" in flags.PhysVal.IDTPM.currentTrkAna.TestType :
135 flags, name=
"TruthTrackMatchingTool" +
136 flags.PhysVal.IDTPM.currentTrkAna.anaTag, **kwargs )
138 log.warning(
"TruthMatch via decorations not configurable if Test or Ref isn't Truth" )
139 log.warning(
"Matching will not be executed for TrkAnalysis %s",
140 flags.PhysVal.IDTPM.currentTrkAna.anaTag )
144 if flags.PhysVal.IDTPM.currentTrkAna.MatchingType ==
"EFTruthMatch":
145 if "EFTrigger" in flags.PhysVal.IDTPM.currentTrkAna.TestType
and "Offline" in flags.PhysVal.IDTPM.currentTrkAna.RefType:
147 flags, name=
"EFTrackMatchingTool" +
148 flags.PhysVal.IDTPM.currentTrkAna.anaTag, **kwargs )
149 log.warning(
"EFTruthMatch via decorations configurable only with EFTrigger as Test Offline as Ref" )
150 log.warning(
"Matching will not be executed for TrkAnalysis %s",
151 flags.PhysVal.IDTPM.currentTrkAna.anaTag )
154 log.warning(
"Requested not supported matching type: %s",
155 flags.PhysVal.IDTPM.currentTrkAna.MatchingType )
156 log.warning(
"Matching will not be executed for TrkAnalysis %s",
157 flags.PhysVal.IDTPM.currentTrkAna.anaTag )