Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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  return icf
21 
22 

◆ __createIDTPMTrkAnaConfigFlags()

def InDetTrackPerfMonFlags.__createIDTPMTrkAnaConfigFlags ( )
private

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

Definition at line 25 of file InDetTrackPerfMonFlags.py.

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

◆ initializeIDTPMConfigFlags()

def InDetTrackPerfMonFlags.initializeIDTPMConfigFlags (   flags)

General config flag category for IDTPM tool job configuration.

Definition at line 152 of file InDetTrackPerfMonFlags.py.

152 def initializeIDTPMConfigFlags(flags):
153  flags.addFlagsCategory( "PhysVal.IDTPM",
154  __createIDTPMConfigFlags , prefix=True )
155 
156  flags.addFlag( 'Output.doWriteAOD_IDTPM', False )
157  flags.addFlag( 'Output.AOD_IDTPMFileName', 'myIDTPM_out.AOD_IDTPM.pool.root' )
158  return flags
159 
160 

◆ initializeIDTPMTrkAnaConfigFlags()

def InDetTrackPerfMonFlags.initializeIDTPMTrkAnaConfigFlags (   flags)

Create flags category and corresponding set of flags.

Definition at line 162 of file InDetTrackPerfMonFlags.py.

163  # Set output file names
164  flags.PhysVal.OutputFileName = flags.PhysVal.IDTPM.outputFilePrefix + '.HIST.root'
165  flags.Output.AOD_IDTPMFileName = flags.PhysVal.IDTPM.outputFilePrefix + '.AOD_IDTPM.pool.root'
166 
167  # Default TrackAnalysis configuration flags category
168  flags.addFlagsCategory( "PhysVal.IDTPM.Default",
169  __createIDTPMTrkAnaConfigFlags,
170  prefix=True )
171 
172  from InDetTrackPerfMon.ConfigUtils import getTrkAnaDicts
173  analysesDict = getTrkAnaDicts( flags )
174  trkAnaNames = []
175  print (str(analysesDict))
176 
177  if analysesDict:
178  for trkAnaName, trkAnaDict in analysesDict.items():
179  # Append TrkAnalysisName to list
180  trkAnaNames.append( trkAnaName )
181 
182  # separate flag category for each TrkAnalysis
183  flags.addFlagsCategory( "PhysVal.IDTPM."+trkAnaName,
184  __createIDTPMTrkAnaConfigFlags,
185  prefix=True )
186 
187  # set flags from values in trkAnaDict
188  for fname, fvalue in trkAnaDict.items():
189 
190  if fname.startswith( "_comment" ): continue
191 
192  setattr( flags.PhysVal.IDTPM,
193  trkAnaName+"."+fname, fvalue )
194 
195 
197  types = [ getattr( flags.PhysVal.IDTPM, trkAnaName+".TestType" ),
198  getattr( flags.PhysVal.IDTPM, trkAnaName+".RefType" ) ]
199  if "Trigger" in types :
200  setattr( flags.PhysVal.IDTPM, trkAnaName+".doTrigNavigation", True )
201 
202  if trkAnaNames:
203  flags.PhysVal.IDTPM.trkAnaNames = trkAnaNames
204 
205  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:25
ConfigUtils.getTrkAnaDicts
def getTrkAnaDicts(flags)
Definition: ConfigUtils.py:7
InDetTrackPerfMonFlags.initializeIDTPMConfigFlags
def initializeIDTPMConfigFlags(flags)
General config flag category for IDTPM tool job configuration.
Definition: InDetTrackPerfMonFlags.py:152
str
Definition: BTagTrackIpAccessor.cxx:11
InDetTrackPerfMonFlags.initializeIDTPMTrkAnaConfigFlags
def initializeIDTPMTrkAnaConfigFlags(flags)
Create flags category and corresponding set of flags.
Definition: InDetTrackPerfMonFlags.py:162