ATLAS Offline Software
Functions
InDetTrackPerfMonFlags Namespace Reference

Functions

def __createIDTPMConfigFlags ()
 IDTPM whole job properties. More...
 
def __createIDTPMTrkAnaConfigFlags ()
 IDTPM individual TrkAnalysis properties to be read from trkAnaCfgFile in JSON format. More...
 
def initializeIDTPMConfigFlags (flags)
 General config flag category for IDTPM tool job configuration. More...
 
def initializeIDTPMTrkAnaConfigFlags (flags)
 Create flags category and corresponding set of flags. More...
 

Function Documentation

◆ __createIDTPMConfigFlags()

def InDetTrackPerfMonFlags.__createIDTPMConfigFlags ( )
private

IDTPM whole job properties.

Definition at line 6 of file InDetTrackPerfMonFlags.py.

7  from AthenaConfiguration.AthConfigFlags import AthConfigFlags
8  icf = AthConfigFlags()
9 
10  icf.addFlag( "DirName", "InDetTrackPerfMonPlots/" )
11  icf.addFlag( "trkAnaNames", ["Default"] )
12  icf.addFlag( "plotsDefFormat", "JSON" )
13  icf.addFlag( "plotsDefFileList" , "InDetTrackPerfMon/PlotsDefFileList_default.txt" )
14  icf.addFlag( "plotsCommonValuesFile", "" )
15  icf.addFlag( "sortPlotsByChain", False )
16 
17  icf.addFlag( "trkAnaCfgFile", '' )
18  icf.addFlag( 'outputFilePrefix','myIDTPM_out')
19  icf.addFlag( 'unpackTrigChains', False )
20  icf.addFlag( 'commonTrkAnaFlags', [] )
21  return icf
22 
23 

◆ __createIDTPMTrkAnaConfigFlags()

def InDetTrackPerfMonFlags.__createIDTPMTrkAnaConfigFlags ( )
private

IDTPM individual TrkAnalysis properties to be read from trkAnaCfgFile in JSON format.

Definition at line 26 of file InDetTrackPerfMonFlags.py.

27  from AthenaConfiguration.AthConfigFlags import AthConfigFlags
28  icf = AthConfigFlags()
29 
30  # General properties
31  icf.addFlag( "enabled", True )
32  icf.addFlag( "anaTag", "" )
33  icf.addFlag( "SubFolder", "" )
34  # Test-Reference collections properties
35  icf.addFlag( "TestType", "Offline" )
36  icf.addFlag( "RefType", "Truth" )
37  icf.addFlag( "doTrigNavigation", False )
38  icf.addFlag( "TrigTrkKey" , "" )
39  icf.addFlag( "OfflineTrkKey" , "InDetTrackParticles" )
40  icf.addFlag( "TruthPartKey" , "TruthParticles" )
41  icf.addFlag( "TrigVtxKey" , "" )
42  icf.addFlag( "OfflineVtxKey" , "PrimaryVertices" )
43  icf.addFlag( "TruthVtxKey" , "TruthVertices" )
44  icf.addFlag( "pileupSwitch" , "HardScatter" )
45  # Cluster/space-point collections properties (for offline-type, ITk/ACTS only)
46  icf.addFlag( "doClusterValidation" , False )
47  icf.addFlag( "PixelClusterKey" , "" )
48  icf.addFlag( "StripClusterKey" , "" )
49  icf.addFlag( "PixelSpacePointKey" , "" )
50  icf.addFlag( "StripSpacePointKey" , "" )
51  icf.addFlag( "StripOverlapSpacePointKey", "" )
52  # Matching properties
53  icf.addFlag( "MatchingType" , "DeltaRMatch" )
54  icf.addFlag( "dRmax" , 0.05 )
55  icf.addFlag( "pTResMax" , -9.9 )
56  icf.addFlag( "truthProbCut" , 0.5 )
57  # Trigger-specific properties
58  icf.addFlag( "ChainNames" , [] )
59  icf.addFlag( "RoiKey" , "" )
60  icf.addFlag( "ChainLeg" , -1 )
61  icf.addFlag( "doTagNProbe" , False )
62  icf.addFlag( "RoiKeyTag" , "" )
63  icf.addFlag( "ChainLegTag" , 0 )
64  icf.addFlag( "RoiKeyProbe" , "" )
65  icf.addFlag( "ChainLegProbe" , 1 )
66  # Offline tracks selection properties
67  icf.addFlag( "SelectOfflineObject", "" )
68  icf.addFlag( "OfflineQualityWP" , "", help="Apply track quality selection cuts to the reconstructed tracks, if blank no selections is done" )
69  icf.addFlag( "DoOfflineSelection", False )
70  icf.addFlag( "offlMaxZ0SinTheta", -9999. )
71  icf.addFlag( "offlMinNInnermostLayerHits", -9999. )
72  icf.addFlag( "offlMinNBothInnermostLayersHits", -9999. )
73  icf.addFlag( "offlMaxNInnermostLayerSharedHits",-9999. )
74  icf.addFlag( "offlMinNSiHits", -9999. )
75  icf.addFlag( "offlMaxNSiSharedHits", -9999. )
76  icf.addFlag( "offlMaxNSiHoles", -9999. )
77  icf.addFlag( "offlMinNPixelHits", -9999. )
78  icf.addFlag( "offlMaxNPixelSharedHits", -9999. )
79  icf.addFlag( "offlMaxNPixelHoles", -9999. )
80  icf.addFlag( "offlMinNSctHits", -9999. )
81  icf.addFlag( "offlMaxNSctSharedHits", -9999.)
82  icf.addFlag( "offlMaxNSctHoles", -9999. )
83  icf.addFlag( "offlMaxChiSq", -9999. )
84  icf.addFlag( "offlMaxChiSqperNdf", -9999. )
85  icf.addFlag( "offlMinPt" , -9999.)
86  icf.addFlag( "offlMaxPt" , -9999. )
87  icf.addFlag( "offlMinEta" , -9999. )
88  icf.addFlag( "offlMaxEta" , -9999. )
89  icf.addFlag( "offlMinPhi" , -9999. )
90  icf.addFlag( "offlMaxPhi" , -9999. )
91  icf.addFlag( "offlMinD0" , -9999. )
92  icf.addFlag( "offlMaxD0" , -9999. )
93  icf.addFlag( "offlMinZ0" , -9999. )
94  icf.addFlag( "offlMaxZ0" , -9999. )
95  icf.addFlag( "offlMinQoPT" , -9999. )
96  icf.addFlag( "offlMaxQoPT" , -9999. )
97  icf.addFlag( "offlMaxAbsEta" , -9999. )
98  icf.addFlag( "offlMinAbsEta" , -9999. )
99  icf.addFlag( "offlMinAbsPhi" , -9999. )
100  icf.addFlag( "offlMaxAbsPhi" , -9999. )
101  icf.addFlag( "offlMinAbsD0" , -9999. )
102  icf.addFlag( "offlMaxAbsD0" , -9999. )
103  icf.addFlag( "offlMinAbsZ0" , -9999. )
104  icf.addFlag( "offlMaxAbsZ0" , -9999. )
105  icf.addFlag( "offlMinAbsQoPT" , -9999. )
106  icf.addFlag( "offlMaxAbsQoPT" , -9999. )
107 
108  icf.addFlag( "offlEtaBins" , [] )
109  icf.addFlag( "offlMinHitsVector" , [] )
110  icf.addFlag( "offlMinPtVector" , [] )
111  icf.addFlag( "offlMaxD0Vector" , [] )
112  icf.addFlag( "offlMaxZ0Vector" , [] )
113  icf.addFlag( "offlMinProb" , -9999. )
114  icf.addFlag( "ObjectQuality" , "Medium" )
115  icf.addFlag( "TauType" , "RNN" )
116  icf.addFlag( "TauNprongs" , 1 )
117  icf.addFlag( "TruthProbMin" , 0.5 )
118  # Truth particles selection properties
119  icf.addFlag( "SelectTruthObject" , "" )
120  icf.addFlag( "truthMinPt" , -9999., help="Apply minimum pt cut to truth particle" )
121  icf.addFlag( "truthMaxPt" , -9999., help="Apply maximum pt cut to truth particle" )
122  icf.addFlag( "truthMinEta" , -9999., help="Apply minimum eta cut to truth particle" )
123  icf.addFlag( "truthMaxEta" , -9999., help="Apply maximum eta cut to truth particle" )
124  icf.addFlag( "truthMinPhi" , -9999., help="Apply minimum phi cut to truth particle" )
125  icf.addFlag( "truthMaxPhi" , -9999., help="Apply maximum phi cut to truth particle" )
126  icf.addFlag( "truthMinD0" , -9999., help="Apply minimum d0 cut to truth particle" )
127  icf.addFlag( "truthMaxD0" , -9999., help="Apply maximum d0 cut to truth particle" )
128  icf.addFlag( "truthMinZ0" , -9999., help="Apply minimum z0 cut to truth particle" )
129  icf.addFlag( "truthMaxZ0" , -9999., help="Apply maximum z0 cut to truth particle" )
130  icf.addFlag( "truthMinQoPT" , -9999., help="Apply minimum q/pt cut to truth particle" )
131  icf.addFlag( "truthMaxQoPT" , -9999., help="Apply maximum q/pt cut to truth particle" )
132  icf.addFlag( "truthMinAbsEta" , -9999., help="Apply minimum |eta| cut to truth particle" )
133  icf.addFlag( "truthMaxAbsEta" , -9999., help="Apply maximum |eta| cut to truth particle" )
134  icf.addFlag( "truthMinAbsPhi" , -9999., help="Apply minimum |phi| cut to truth particle" )
135  icf.addFlag( "truthMaxAbsPhi" , -9999., help="Apply maximum |phi| cut to truth particle" )
136  icf.addFlag( "truthMinAbsD0" , -9999., help="Apply minimum |d0| cut to truth particle" )
137  icf.addFlag( "truthMaxAbsD0" , -9999., help="Apply maximum |d0| cut to truth particle" )
138  icf.addFlag( "truthMinAbsZ0" , -9999., help="Apply minimum |z0| cut to truth particle" )
139  icf.addFlag( "truthMaxAbsZ0" , -9999., help="Apply maximum |z0| cut to truth particle" )
140  icf.addFlag( "truthMinAbsQoPT" , -9999., help="Apply minimum |q/pt| cut to truth particle" )
141  icf.addFlag( "truthMaxAbsQoPT" , -9999., help="Apply maximum |q/pt| cut to truth particle" )
142  icf.addFlag( "truthPdgId" , -9999., help="Apply pdgId selection to truth particle" )
143 
144  icf.addFlag( "truthMinParentPt" , -9999. )
145  icf.addFlag( "truthMaxParentPt", -9999. )
146 
147 
148  # Jet-track matching properties
149  icf.addFlag( "JetContainerName", "InTimeAntiKt4TruthJets" )
150  icf.addFlag( "maxTrkJetDR", 0.4 )
151  icf.addFlag( "jetMinAbsEta", -9999. )
152  icf.addFlag( "jetMaxAbsEta", 4.0 )
153  icf.addFlag( "jetMinPt", 1000.0 )
154  icf.addFlag( "jetMaxPt", 5000000.0 )
155  # Histogram properties
156  icf.addFlag( "plotTrackParameters" , True )
157  icf.addFlag( "plotTrackParametersErrors", False )
158  icf.addFlag( "plotTrackMultiplicities" , True )
159  icf.addFlag( "plotEfficiencies" , True )
160  icf.addFlag( "plotTechnicalEfficiencies", False )
161  icf.addFlag( "useActsSiMeasurements" , False )
162  icf.addFlag( "plotResolutions" , True )
163  icf.addFlag( "plotFakeRates" , True )
164  icf.addFlag( "unlinkedAsFakes" , True )
165  icf.addFlag( "plotDuplicateRates" , False )
166  icf.addFlag( "plotHitsOnTracks" , True )
167  icf.addFlag( "plotHitsOnTracksReference", False )
168  icf.addFlag( "plotHitsOnMatchedTracks" , False )
169  icf.addFlag( "plotHitsOnFakeTracks" , False )
170  icf.addFlag( "plotVertexParameters" , True )
171  icf.addFlag( "useSelectedVertexTracks" , False )
172  icf.addFlag( "plotOfflineElectrons" , False )
173  icf.addFlag( "ResolutionMethod" , "iterRMS" )
174 
175  return icf
176 

◆ initializeIDTPMConfigFlags()

def InDetTrackPerfMonFlags.initializeIDTPMConfigFlags (   flags)

General config flag category for IDTPM tool job configuration.

Definition at line 178 of file InDetTrackPerfMonFlags.py.

178 def initializeIDTPMConfigFlags(flags):
179  flags.addFlagsCategory( "PhysVal.IDTPM",
180  __createIDTPMConfigFlags , prefix=True )
181 
182  flags.addFlag( 'Output.doWriteAOD_IDTPM', False )
183  flags.addFlag( 'Output.AOD_IDTPMFileName', 'myIDTPM_out.AOD_IDTPM.pool.root' )
184  return flags
185 
186 

◆ initializeIDTPMTrkAnaConfigFlags()

def InDetTrackPerfMonFlags.initializeIDTPMTrkAnaConfigFlags (   flags)

Create flags category and corresponding set of flags.

Definition at line 188 of file InDetTrackPerfMonFlags.py.

189  # Set output file names
190  prefix = flags.PhysVal.IDTPM.outputFilePrefix
191  if 'HIST.root' in prefix :
192  flags.PhysVal.OutputFileName = prefix
193  flags.Output.AOD_IDTPMFileName = prefix.replace( 'HIST', 'AOD_IDTPM.pool' )
194  else :
195  flags.PhysVal.OutputFileName = prefix + '.HIST.root'
196  flags.Output.AOD_IDTPMFileName = prefix + '.AOD_IDTPM.pool.root'
197 
198  # Default TrackAnalysis configuration flags category
199  flags.addFlagsCategory( "PhysVal.IDTPM.Default",
200  __createIDTPMTrkAnaConfigFlags,
201  prefix=True )
202 
203  # Common TrackAnalysis configuration flags category
204  # to override individual flags in all the trkanalyses configurations with a common value
205  flags.addFlagsCategory( "PhysVal.IDTPM.Common",
206  __createIDTPMTrkAnaConfigFlags,
207  prefix=True )
208 
209 
210  commonTrkAnaFlags_new = []
211  for f in flags.PhysVal.IDTPM.commonTrkAnaFlags :
212  if "PhysVal.IDTPM.Common." not in f :
213  commonTrkAnaFlags_new.append( "PhysVal.IDTPM.Common."+f )
214  else : commonTrkAnaFlags_new.append(f)
215 
216  # Update PhysVal.IDTPM.Common flags category with values parsed from commonTrkAnaFlags_new
217  # This is used to keep flags values of the correct/consitent type
218  if commonTrkAnaFlags_new :
219  flags.fillFromArgs( listOfArgs=commonTrkAnaFlags_new )
220 
221  from InDetTrackPerfMon.ConfigUtils import getTrkAnaDicts
222  analysesDict = getTrkAnaDicts( flags )
223  trkAnaNames = []
224 
225  if analysesDict:
226  for trkAnaName, trkAnaDict in analysesDict.items():
227  # Append TrkAnalysisName to list
228  trkAnaNames.append( trkAnaName )
229 
230  # separate flag category for each TrkAnalysis
231  flags.addFlagsCategory( "PhysVal.IDTPM."+trkAnaName,
232  __createIDTPMTrkAnaConfigFlags,
233  prefix=True )
234 
235  # set flags from values in trkAnaDict
236  for fname, fvalue in trkAnaDict.items():
237 
238  if fname.startswith( "_comment" ): continue
239 
240  setattr( flags.PhysVal.IDTPM, trkAnaName+"."+fname, fvalue )
241 
242  # override flags for this trkAna with common ones from commonTrkAnaFlags
243  for cflag in commonTrkAnaFlags_new :
244  cfname = cflag.split('=')[0].split('.')[-1] # parsing only the name of the flag
245  cfvalue = getattr( flags.PhysVal.IDTPM.Common, cfname ) # getting its value in the correct type
246  setattr( flags.PhysVal.IDTPM, trkAnaName+"."+cfname, cfvalue )
247 
248 
250  types = [ getattr( flags.PhysVal.IDTPM, trkAnaName+".TestType" ),
251  getattr( flags.PhysVal.IDTPM, trkAnaName+".RefType" ) ]
252  if "Trigger" in types :
253  setattr( flags.PhysVal.IDTPM, trkAnaName+".doTrigNavigation", True )
254 
255  if trkAnaNames:
256  flags.PhysVal.IDTPM.trkAnaNames = trkAnaNames
257 
258  return flags
InDetTrackPerfMonFlags.__createIDTPMConfigFlags
def __createIDTPMConfigFlags()
IDTPM whole job properties.
Definition: InDetTrackPerfMonFlags.py:6
InDetTrackPerfMonFlags.__createIDTPMTrkAnaConfigFlags
def __createIDTPMTrkAnaConfigFlags()
IDTPM individual TrkAnalysis properties to be read from trkAnaCfgFile in JSON format.
Definition: InDetTrackPerfMonFlags.py:26
ConfigUtils.getTrkAnaDicts
def getTrkAnaDicts(flags)
Definition: ConfigUtils.py:19
InDetTrackPerfMonFlags.initializeIDTPMConfigFlags
def initializeIDTPMConfigFlags(flags)
General config flag category for IDTPM tool job configuration.
Definition: InDetTrackPerfMonFlags.py:178
InDetTrackPerfMonFlags.initializeIDTPMTrkAnaConfigFlags
def initializeIDTPMTrkAnaConfigFlags(flags)
Create flags category and corresponding set of flags.
Definition: InDetTrackPerfMonFlags.py:188
Trk::split
@ split
Definition: LayerMaterialProperties.h:38