ATLAS Offline Software
Functions
InDetSelectionConfig Namespace Reference

Functions

def RoiSelectionToolCfg (flags, name="RoiSelectionTool", **kwargs)
 
def TrackRoiSelectionToolCfg (flags, name="TrackRoiSelectionTool", **kwargs)
 
def TrackObjectSelectionToolCfg (flags, name="TrackObjectSelectionTool", **kwargs)
 
def OfflineQualitySelectionCfg (flags, name="OfflineSelectionTool", **kwargs)
 
def TruthQualitySelectionToolCfg (flags, name="TruthQualitySelectionTool", **kwargs)
 
def TrackQualitySelectionToolCfg (flags, name="TrackQualitySelectionTool", **kwargs)
 

Function Documentation

◆ OfflineQualitySelectionCfg()

def InDetSelectionConfig.OfflineQualitySelectionCfg (   flags,
  name = "OfflineSelectionTool",
**  kwargs 
)

Definition at line 60 of file InDetSelectionConfig.py.

60 def OfflineQualitySelectionCfg( flags, name="OfflineSelectionTool", **kwargs ) :
61  acc = ComponentAccumulator()
62 
63  kwargs_InDetTrackSelectionTool = {}
64 
65  if flags.PhysVal.IDTPM.currentTrkAna.offlMinPt!=-9999.:
66  kwargs_InDetTrackSelectionTool.setdefault( "minPt", flags.PhysVal.IDTPM.currentTrkAna.offlMinPt )
67  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsEta!=-9999.:
68  kwargs_InDetTrackSelectionTool.setdefault( "maxAbsEta", flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsEta )
69  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxZ0SinTheta!=-9999.:
70  kwargs_InDetTrackSelectionTool.setdefault( "maxZ0SinTheta", flags.PhysVal.IDTPM.currentTrkAna.offlMaxZ0SinTheta )
71  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxZ0!=-9999.:
72  kwargs_InDetTrackSelectionTool.setdefault( "maxZ0", flags.PhysVal.IDTPM.currentTrkAna.offlMaxZ0 )
73  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxD0!=-9999.:
74  kwargs_InDetTrackSelectionTool.setdefault( "maxD0", flags.PhysVal.IDTPM.currentTrkAna.offlMaxD0 )
75  if flags.PhysVal.IDTPM.currentTrkAna.offlMinNInnermostLayerHits!=-9999.:
76  kwargs_InDetTrackSelectionTool.setdefault( "minNInnermostLayerHits", flags.PhysVal.IDTPM.currentTrkAna.offlMinNInnermostLayerHits )
77  if flags.PhysVal.IDTPM.currentTrkAna.offlMinNBothInnermostLayersHits!=-9999.:
78  kwargs_InDetTrackSelectionTool.setdefault( "minNBothInnermostLayersHits", flags.PhysVal.IDTPM.currentTrkAna.offlMinNBothInnermostLayersHits )
79  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNInnermostLayerSharedHits!=-9999.:
80  kwargs_InDetTrackSelectionTool.setdefault( "maxNInnermostLayerSharedHits", flags.PhysVal.IDTPM.currentTrkAna.offlMaxNInnermostLayerSharedHits )
81  if flags.PhysVal.IDTPM.currentTrkAna.offlMinNSiHits!=-9999.:
82  kwargs_InDetTrackSelectionTool.setdefault( "minNSiHits", flags.PhysVal.IDTPM.currentTrkAna.offlMinNSiHits )
83  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSiSharedHits!=-9999.:
84  kwargs_InDetTrackSelectionTool.setdefault( "maxNSiSharedHits", flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSiSharedHits )
85  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSiHoles!=-9999.:
86  kwargs_InDetTrackSelectionTool.setdefault( "maxNSiHoles", flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSiHoles )
87  if flags.PhysVal.IDTPM.currentTrkAna.offlMinNPixelHits!=-9999.:
88  kwargs_InDetTrackSelectionTool.setdefault( "minNPixelHits", flags.PhysVal.IDTPM.currentTrkAna.offlMinNPixelHits )
89  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNPixelSharedHits!=-9999.:
90  kwargs_InDetTrackSelectionTool.setdefault( "maxNPixelSharedHits", flags.PhysVal.IDTPM.currentTrkAna.offlMaxNPixelSharedHits )
91  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNPixelHoles!=-9999.:
92  kwargs_InDetTrackSelectionTool.setdefault( "maxNPixelHoles", flags.PhysVal.IDTPM.currentTrkAna.offlMaxNPixelHoles )
93  if flags.PhysVal.IDTPM.currentTrkAna.offlMinNSctHits!=-9999.:
94  kwargs_InDetTrackSelectionTool.setdefault( "minNSctHits", flags.PhysVal.IDTPM.currentTrkAna.offlMinNSctHits )
95  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSctSharedHits!=-9999.:
96  kwargs_InDetTrackSelectionTool.setdefault( "maxNSctSharedHits", flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSctSharedHits )
97  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxNSctHoles!=-9999.:
98  kwargs_InDetTrackSelectionTool.setdefault( "maxNSctHoles", flags.PhysVal.IDTPM.currentTrkAna.offlMaxChiSq )
99  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxChiSq!=-9999.:
100  kwargs_InDetTrackSelectionTool.setdefault( "maxChiSq", flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsEta )
101  if flags.PhysVal.IDTPM.currentTrkAna.offlMaxChiSqperNdf!=-9999.:
102  kwargs_InDetTrackSelectionTool.setdefault( "maxChiSqperNdf", flags.PhysVal.IDTPM.currentTrkAna.offlMaxChiSqperNdf )
103  if flags.PhysVal.IDTPM.currentTrkAna.offlMinProb!=-9999.:
104  kwargs_InDetTrackSelectionTool.setdefault( "minProb", flags.PhysVal.IDTPM.currentTrkAna.offlMinProb )
105  kwargs_InDetTrackSelectionTool.setdefault( "CutLevel", flags.PhysVal.IDTPM.currentTrkAna.OfflineQualityWP )
106 
107  from InDetConfig.InDetTrackSelectionToolConfig import InDetTrackSelectionToolCfg
108  offlineSelectionTool = acc.popToolsAndMerge( InDetTrackSelectionToolCfg( flags, **kwargs_InDetTrackSelectionTool) )
109 
110  kwargs.setdefault( "offlineTool", offlineSelectionTool )
111  kwargs.setdefault( "maxPt", flags.PhysVal.IDTPM.currentTrkAna.offlMaxPt )
112  kwargs.setdefault( "minEta", flags.PhysVal.IDTPM.currentTrkAna.offlMinEta )
113  kwargs.setdefault( "minPhi", flags.PhysVal.IDTPM.currentTrkAna.offlMinPhi )
114  kwargs.setdefault( "maxPhi", flags.PhysVal.IDTPM.currentTrkAna.offlMaxPhi )
115  kwargs.setdefault( "minD0", flags.PhysVal.IDTPM.currentTrkAna.offlMinD0 )
116  kwargs.setdefault( "minZ0", flags.PhysVal.IDTPM.currentTrkAna.offlMinZ0 )
117  kwargs.setdefault( "minQoPT", flags.PhysVal.IDTPM.currentTrkAna.offlMinQoPT )
118  kwargs.setdefault( "maxQoPT", flags.PhysVal.IDTPM.currentTrkAna.offlMaxQoPT )
119  kwargs.setdefault( "minAbsEta", flags.PhysVal.IDTPM.currentTrkAna.offlMinAbsEta )
120  kwargs.setdefault( "minAbsPhi", flags.PhysVal.IDTPM.currentTrkAna.offlMinAbsPhi )
121  kwargs.setdefault( "maxAbsPhi", flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsPhi )
122  kwargs.setdefault( "minAbsD0", flags.PhysVal.IDTPM.currentTrkAna.offlMinAbsD0 )
123  kwargs.setdefault( "maxAbsD0", flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsD0 )
124  kwargs.setdefault( "minAbsZ0", flags.PhysVal.IDTPM.currentTrkAna.offlMinAbsZ0 )
125  kwargs.setdefault( "maxAbsZ0", flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsZ0 )
126  kwargs.setdefault( "minAbsQoPT", flags.PhysVal.IDTPM.currentTrkAna.offlMinAbsQoPT )
127  kwargs.setdefault( "maxAbsQoPT", flags.PhysVal.IDTPM.currentTrkAna.offlMaxAbsQoPT )
128 
129  acc.setPrivateTools( CompFactory.IDTPM.OfflineTrackQualitySelectionTool( name, **kwargs ) )
130 
131  return acc
132 
133 

◆ RoiSelectionToolCfg()

def InDetSelectionConfig.RoiSelectionToolCfg (   flags,
  name = "RoiSelectionTool",
**  kwargs 
)
CA-based configuration for the Tool to retrieve and select RoIs 

Definition at line 15 of file InDetSelectionConfig.py.

15 def RoiSelectionToolCfg( flags, name="RoiSelectionTool", **kwargs ) :
16  '''
17  CA-based configuration for the Tool to retrieve and select RoIs
18  '''
19  acc = ComponentAccumulator()
20 
21  kwargs.setdefault( "RoiKey", flags.PhysVal.IDTPM.currentTrkAna.RoiKey )
22  kwargs.setdefault( "ChainLeg", flags.PhysVal.IDTPM.currentTrkAna.ChainLeg )
23  kwargs.setdefault( "doTagNProbe", flags.PhysVal.IDTPM.currentTrkAna.doTagNProbe )
24  kwargs.setdefault( "RoiKeyTag", flags.PhysVal.IDTPM.currentTrkAna.RoiKeyTag )
25  kwargs.setdefault( "ChainLegTag", flags.PhysVal.IDTPM.currentTrkAna.ChainLegTag )
26  kwargs.setdefault( "RoiKeyProbe", flags.PhysVal.IDTPM.currentTrkAna.RoiKeyProbe )
27  kwargs.setdefault( "ChainLegProbe", flags.PhysVal.IDTPM.currentTrkAna.ChainLegProbe )
28 
29  acc.setPrivateTools( CompFactory.IDTPM.RoiSelectionTool( name, **kwargs ) )
30  return acc
31 
32 

◆ TrackObjectSelectionToolCfg()

def InDetSelectionConfig.TrackObjectSelectionToolCfg (   flags,
  name = "TrackObjectSelectionTool",
**  kwargs 
)

Definition at line 43 of file InDetSelectionConfig.py.

43 def TrackObjectSelectionToolCfg( flags, name="TrackObjectSelectionTool", **kwargs ):
44  acc = ComponentAccumulator()
45 
46  objStr = flags.PhysVal.IDTPM.currentTrkAna.SelectOfflineObject
47  kwargs.setdefault( "ObjectType", objStr )
48  kwargs.setdefault( "ObjectQuality", flags.PhysVal.IDTPM.currentTrkAna.ObjectQuality )
49 
50  if "Tau" in objStr:
51  kwargs.setdefault( "TauType", flags.PhysVal.IDTPM.currentTrkAna.TauType )
52  kwargs.setdefault( "TauNprongs", flags.PhysVal.IDTPM.currentTrkAna.TauNprongs )
53 
54  if "Truth" in objStr:
55  kwargs.setdefault( "MatchingTruthProb", flags.PhysVal.IDTPM.currentTrkAna.TruthProbMin )
56 
57  acc.setPrivateTools( CompFactory.IDTPM.TrackObjectSelectionTool( name, **kwargs ) )
58  return acc
59 

◆ TrackQualitySelectionToolCfg()

def InDetSelectionConfig.TrackQualitySelectionToolCfg (   flags,
  name = "TrackQualitySelectionTool",
**  kwargs 
)

Definition at line 212 of file InDetSelectionConfig.py.

212 def TrackQualitySelectionToolCfg( flags, name="TrackQualitySelectionTool", **kwargs ):
213  acc = ComponentAccumulator()
214 
215 
216  if flags.PhysVal.IDTPM.currentTrkAna.OfflineQualityWP != "" or flags.PhysVal.IDTPM.currentTrkAna.DoOfflineSelection:
217  kwargs.setdefault( "DoOfflineSelection", True )
218 
219  kwargs.setdefault( "OfflineSelectionTool", acc.popToolsAndMerge(
220  OfflineQualitySelectionCfg( flags, name="OfflineSelectionTool"+flags.PhysVal.IDTPM.currentTrkAna.anaTag ) ) )
221 
222 
223  if flags.Input.isMC:
224  kwargs.setdefault( "DoTruthSelection", True )
225 
226  kwargs.setdefault( "TruthSelectionTool", acc.popToolsAndMerge(
227  TruthQualitySelectionToolCfg( flags, name="TruthQualitySelectionTool"+flags.PhysVal.IDTPM.currentTrkAna.anaTag ) ) )
228 
229 
230  if flags.PhysVal.IDTPM.currentTrkAna.SelectOfflineObject != "":
231  kwargs.setdefault( "DoObjectSelection", True )
232 
233  if "TrackObjectSelectionTool" not in kwargs:
234  kwargs.setdefault( "TrackObjectSelectionTool", acc.popToolsAndMerge(
236  name="TrackObjectSelectionTool" + flags.PhysVal.IDTPM.currentTrkAna.anaTag ) ) )
237 
238  acc.setPrivateTools( CompFactory.IDTPM.TrackQualitySelectionTool( name, **kwargs ) )
239  return acc

◆ TrackRoiSelectionToolCfg()

def InDetSelectionConfig.TrackRoiSelectionToolCfg (   flags,
  name = "TrackRoiSelectionTool",
**  kwargs 
)

Definition at line 33 of file InDetSelectionConfig.py.

33 def TrackRoiSelectionToolCfg( flags, name="TrackRoiSelectionTool", **kwargs ):
34  acc = ComponentAccumulator()
35 
36  kwargs.setdefault( "TriggerTrkParticleContainerName",
37  flags.PhysVal.IDTPM.currentTrkAna.TrigTrkKey )
38 
39  acc.setPrivateTools( CompFactory.IDTPM.TrackRoiSelectionTool( name, **kwargs ) )
40  return acc
41 
42 

◆ TruthQualitySelectionToolCfg()

def InDetSelectionConfig.TruthQualitySelectionToolCfg (   flags,
  name = "TruthQualitySelectionTool",
**  kwargs 
)

Definition at line 134 of file InDetSelectionConfig.py.

134 def TruthQualitySelectionToolCfg( flags, name="TruthQualitySelectionTool", **kwargs ) :
135  acc = ComponentAccumulator()
136 
137  # Default configurations
138  # ----------------------
139  truthMinPt = flags.PhysVal.IDTPM.currentTrkAna.truthMinPt
140  truthMaxPt = flags.PhysVal.IDTPM.currentTrkAna.truthMaxPt
141  truthPdgId = flags.PhysVal.IDTPM.currentTrkAna.truthPdgId
142  truthIsHadron = flags.PhysVal.IDTPM.currentTrkAna.truthIsHadron
143 
144  if "Muon" in flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject:
145  truthPdgId = 13
146  if flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject == "highPTMuon":
147  truthMinPt = 20000
148  truthMaxPt = -9999.
149  if flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject == "lowPTMuon":
150  truthMinPt = 10000
151  truthMaxPt = 20000
152 
153  elif "Hadron" in flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject:
154  truthIsHadron = True
155  if flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject == "highPTHadron":
156  truthMinPt = 20000
157  truthMaxPt = -9999.
158  if flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject == "lowPTHadron":
159  truthMinPt = 10000
160  truthMaxPt = 20000
161 
162  elif "Electron" in flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject:
163  truthPdgId = 11
164  if flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject == "highPTElectron":
165  truthMinPt = 10000
166  truthMaxPt = -9999.
167  if flags.PhysVal.IDTPM.currentTrkAna.SelectTruthObject == "lowPTElectron":
168  truthMinPt = 5000
169  truthMaxPt = 10000
170 
171 
172  # InDetRttTruthSelectionTool properties
173  # -------------------------------------
174  kwargs_InDetRttTruthSelectionTool = {}
175  if truthMinPt!=-9999.: kwargs_InDetRttTruthSelectionTool.setdefault( "minPt", truthMinPt )
176  if truthMaxPt!=-9999.: kwargs_InDetRttTruthSelectionTool.setdefault( "maxPt", truthMaxPt )
177  if flags.PhysVal.IDTPM.currentTrkAna.truthMaxAbsEta!=-9999.: kwargs_InDetRttTruthSelectionTool.setdefault( "maxEta", flags.PhysVal.IDTPM.currentTrkAna.truthMaxAbsEta )
178  if truthPdgId!=-9999.: kwargs_InDetRttTruthSelectionTool.setdefault( "pdgId", truthPdgId )
179 
180  from InDetPhysValMonitoring.InDetPhysValMonitoringConfig import InDetRttTruthSelectionToolCfg
181  truthSelectionTool = acc.popToolsAndMerge(InDetRttTruthSelectionToolCfg(flags, **kwargs_InDetRttTruthSelectionTool))
182 
183  # Additional properties
184  # ---------------------
185  kwargs.setdefault( "truthTool" , truthSelectionTool)
186  kwargs.setdefault( "maxEta", flags.PhysVal.IDTPM.currentTrkAna.truthMaxEta )
187  kwargs.setdefault( "minEta", flags.PhysVal.IDTPM.currentTrkAna.truthMinEta )
188  kwargs.setdefault( "minPhi", flags.PhysVal.IDTPM.currentTrkAna.truthMinPhi )
189  kwargs.setdefault( "maxPhi", flags.PhysVal.IDTPM.currentTrkAna.truthMaxPhi )
190  kwargs.setdefault( "minD0", flags.PhysVal.IDTPM.currentTrkAna.truthMinD0 )
191  kwargs.setdefault( "maxD0", flags.PhysVal.IDTPM.currentTrkAna.truthMaxD0 )
192  kwargs.setdefault( "minZ0", flags.PhysVal.IDTPM.currentTrkAna.truthMinZ0 )
193  kwargs.setdefault( "maxZ0", flags.PhysVal.IDTPM.currentTrkAna.truthMaxZ0 )
194  kwargs.setdefault( "minQoPT", flags.PhysVal.IDTPM.currentTrkAna.truthMinQoPT )
195  kwargs.setdefault( "maxQoPT", flags.PhysVal.IDTPM.currentTrkAna.truthMaxQoPT )
196  kwargs.setdefault( "isHadron", truthIsHadron )
197  kwargs.setdefault( "minAbsEta", flags.PhysVal.IDTPM.currentTrkAna.truthMinAbsEta )
198  kwargs.setdefault( "minAbsPhi", flags.PhysVal.IDTPM.currentTrkAna.truthMinAbsPhi )
199  kwargs.setdefault( "maxAbsPhi", flags.PhysVal.IDTPM.currentTrkAna.truthMaxAbsPhi )
200  kwargs.setdefault( "minAbsD0", flags.PhysVal.IDTPM.currentTrkAna.truthMinAbsD0 )
201  kwargs.setdefault( "maxAbsD0", flags.PhysVal.IDTPM.currentTrkAna.truthMaxAbsD0 )
202  kwargs.setdefault( "minAbsZ0", flags.PhysVal.IDTPM.currentTrkAna.truthMinAbsZ0 )
203  kwargs.setdefault( "maxAbsZ0", flags.PhysVal.IDTPM.currentTrkAna.truthMaxAbsZ0 )
204  kwargs.setdefault( "minAbsQoPT", flags.PhysVal.IDTPM.currentTrkAna.truthMinAbsQoPT )
205  kwargs.setdefault( "maxAbsQoPT", flags.PhysVal.IDTPM.currentTrkAna.truthMaxAbsQoPT )
206 
207  acc.setPrivateTools( CompFactory.IDTPM.TruthQualitySelectionTool( name, **kwargs ) )
208 
209  return acc
210 
211 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
InDetSelectionConfig.TrackObjectSelectionToolCfg
def TrackObjectSelectionToolCfg(flags, name="TrackObjectSelectionTool", **kwargs)
Definition: InDetSelectionConfig.py:43
InDetSelectionConfig.TruthQualitySelectionToolCfg
def TruthQualitySelectionToolCfg(flags, name="TruthQualitySelectionTool", **kwargs)
Definition: InDetSelectionConfig.py:134
InDetSelectionConfig.OfflineQualitySelectionCfg
def OfflineQualitySelectionCfg(flags, name="OfflineSelectionTool", **kwargs)
Definition: InDetSelectionConfig.py:60
InDetSelectionConfig.TrackRoiSelectionToolCfg
def TrackRoiSelectionToolCfg(flags, name="TrackRoiSelectionTool", **kwargs)
Definition: InDetSelectionConfig.py:33
python.InDetTrackSelectionToolConfig.InDetTrackSelectionToolCfg
def InDetTrackSelectionToolCfg(flags, name="InDetTrackSelectionTool", **kwargs)
Definition: InDetTrackSelectionToolConfig.py:7
InDetPhysValMonitoringConfig.InDetRttTruthSelectionToolCfg
def InDetRttTruthSelectionToolCfg(flags, name="InDetRttTruthSelectionTool", **kwargs)
Definition: InDetPhysValMonitoringConfig.py:38
InDetSelectionConfig.TrackQualitySelectionToolCfg
def TrackQualitySelectionToolCfg(flags, name="TrackQualitySelectionTool", **kwargs)
Definition: InDetSelectionConfig.py:212
InDetSelectionConfig.RoiSelectionToolCfg
def RoiSelectionToolCfg(flags, name="RoiSelectionTool", **kwargs)
Definition: InDetSelectionConfig.py:15