7 print(
'Looking at',el )
9 if definition[
'path' ].
get(
'ART',
None)
is None:
13 if 'forEach' in definition:
14 if len( definition[
'forEach' ] ) > 0:
15 probabilities = definition[
'forEach' ]
16 print(
'forEach:',probabilities )
18 if 'forEachTruthType' in definition:
19 if len( definition[
'forEachTruthType' ] ) > 0:
20 flavours = definition[
'forEachTruthType' ]
21 print(
'FLAVS:',flavours )
30 definition = myMap[el]
31 if definition[
'path' ].
get(
'ART',
None)
is None:
35 if 'forEach' in definition:
36 if len( definition[
'forEach' ] ) > 0:
37 probabilities = definition[
'forEach' ]
38 print(
'forEach:',probabilities )
40 if 'forEachTruthType' in definition:
41 if len( definition[
'forEachTruthType' ] ) > 0:
42 flavours = definition[
'forEachTruthType' ]
51 for prob
in probabilities:
54 histoPath =
str(definition[
'path'][
'ART'])
57 name +=
"_" +
str(prob)
60 name =
str(flav) +
"_" + name
61 histoPath =
str(flav)+
"/"+
str(definition[
'path'][
'ART'])
64 name =
str(chain) +
"_" + name
65 histoPath =
str(chain) +
"/"+ histoPath
67 toAdd = [
str(definition[
'type']),
69 str(definition[
'title']+
";"+definition[
'xtitle']+
";"+definition[
'ytitle']),
71 str(definition[
'xbins']),
72 str(definition[
'xmin']),
73 str(definition[
'xmax']) ]
74 output.append( toAdd )
82 for prob
in probabilities:
85 histoPath =
str(definition[
'path'][
'ART'])
88 name +=
"_" +
str(prob)
91 name =
str(flav) +
"_" + name
92 histoPath =
str(flav)+
"/"+
str(definition[
'path'][
'ART'])
95 name =
str(chain) +
"_" + name
96 histoPath =
str(chain) +
"/"+ histoPath
98 toAdd = [
str(definition[
'type']),
100 str(definition[
'title']+
";"+definition[
'xtitle']+
";"+definition[
'ytitle']),
102 str(definition[
'xbins']),
103 str(definition[
'xmin']),
104 str(definition[
'xmax']),
105 str(definition[
'ybins']),
106 str(definition[
'ymin']),
107 str(definition[
'ymax']) ]
108 output.append( toAdd )
117 from AthenaCommon.Utils.unixtools
import FindFile
119 path =
FindFile(
"JetTagDQA/PhysValBtag_VariablesMenu.json", os.environ[
"DATAPATH"].
split(os.pathsep), os.R_OK)
121 inFile =
open( path,
'r' )
122 mappa = json.load( inFile )
135 variables2D +=
getHistogram2D( mappa[
'CombinedQuantities' ],chains )
137 return [ variables1D,variables2D ]