12 if 'DISPLAY' in os.environ:
13 del os.environ[
'DISPLAY']
18 from D3PDMakerTest.Treereader
import treereader
23 getattr(cppyy.gbl,
'vector<char>')
24 getattr(cppyy.gbl,
'vector<unsigned char>')
25 getattr(cppyy.gbl,
'vector<float>')
26 getattr(cppyy.gbl,
'vector<short>')
27 getattr(cppyy.gbl,
'map<string,string>')
30 from RootUtils
import PyROOTFixes
31 PyROOTFixes.enable_tree_fixes()
33 from PyUtils.fprint
import fprintln
36 if isinstance(x, str):
43 for i
in range (tr.n):
44 assert tr.i[i] == tr.mult_i[i]
45 print (
' %1d %3d %3d %3d %3d %3d %3d %5.1f %5.1f %1d %3d %5.1f %3d %5.1f %3d %5.1f %3d %5.1f' %
66 print (
' %3d %3d' % (ord(tr.c1[i]), ord(tr.c2[i])), end=
'')
67 print (
' %3d %3d' % (ord(tr.uc1[i]), ord(tr.uc2[i])), end=
'')
68 print (
' %3d %3d' % (tr.s1[i], tr.s2[i]), end=
'')
69 print (
' %3d %3d' % (tr.us1[i], tr.us2[i]), end=
'')
70 print (
' %3d %3d' % (tr.i1[i], tr.i2[i]), end=
'')
71 print (
' %3d %3d' % (tr.ui1[i], tr.ui2[i]), end=
'')
72 print (
' %5.1f %5.1f' % (tr.f1[i], tr.f2[i]), end=
'')
73 print (
' %5.1f %5.1f' % (tr.d1[i], tr.d2[i]), end=
'')
74 print (
' %3d %3d' % (tr.b1[i], tr.b2[i]))
76 for j
in range (tr.o2b_n[i]):
77 assert tr.o2b_mult_i[i][j] == tr.o2b_i[i][j]
78 print (
' o2b%1d %3d %5.1f' % (j,
85 for i
in range (tr.n):
86 print (
' %1d %3d %5.1f %3d %5.1f %3d %5.1f' %
99 for i
in range (tr.n):
100 fprintln (sys.stdout,
' ', i, tr.pt[i], tr.eta[i], tr.phi[i], tr.m[i], tuple(tr.index[i]), tr.a1_index[i])
101 fprintln (sys.stdout,
' ', tr.hlv_pt[i], tr.hlv_eta[i], tr.hlv_phi[i], tr.hlv_m[i])
106 for i
in range (tr.n):
107 print (
' ', i, tr.obj4[i])
111 for i
in range (tr.n):
112 print (
' ', i, tr.obj5[i], tr.anInt[i], tr.aFloat[i], tr.s[i],
113 '%7.1f %6.3f %6.3f' % (tr.aFourvec[i].
Pt(),
114 tr.aFourvec[i].
Eta(),
115 tr.aFourvec[i].Phi()),
120 print (
' %3d %3d' % (ord(tr.c1), ord(tr.c2)))
121 print (
' %3d %3d' % (ord(tr.uc1), ord(tr.uc2)))
122 print (
' %3d %3d' % (tr.s1, tr.s2))
123 print (
' %3d %3d' % (tr.us1, tr.us2))
124 print (
' %3d %3d' % (tr.i1, tr.i2))
125 print (
' %3d %3d' % (tr.ui1, tr.ui2))
126 print (
' %5.1f %5.1f' % (tr.f1, tr.f2))
127 print (
' %5.1f %5.1f' % (tr.d1, tr.d2))
128 print (
' %3d %3d' % (tr.b1, tr.b2))
133 for i
in range (tr.n):
134 print (
' ', i, tr.globalTime[i], tr.driftRadius[i],
135 tr.stepLength[i], tr.energyDeposit[i],
136 tr.particleEncoding[i], tr.kineticEnergy[i],
137 tr.MDTid[i], tr.trackNumber[i])
142 for i
in range (tr.n):
143 fprintln (sys.stdout,
' ',
144 i, tr.barcode[i], tr.pdgId[i], tr.E[i], tr.pt[i],
145 tr.eta[i], tr.phi[i], tr.pos_x[i], tr.pos_y[i], tr.pos_z[i],
154 tr_o1 = tr.subreader (
'o1_%s')
155 tr_o1filt = tr.subreader (
'o1filt_%s')
156 tr_o12 = tr.subreader (
'o12_%s')
157 tr_o3 = tr.subreader (
'o3_%s')
158 tr_o4 = tr.subreader (
'o4_%s')
159 tr_o5 = tr.subreader (
'o5_%s')
160 tr_def = tr.subreader (
'def_%s')
161 tr_mdt = tr.subreader (
'mdt_hit_%s')
162 tr_trackrecord = tr.subreader (
'ms_entry_truth_%s')
167 print (
'-----------')
169 dump_obj1 (tr_o1, dodef =
True)
172 print (
'** Obj1filt')
173 dump_obj1 (tr_o1filt, coll =
False)
184 print (
'** TrackRecord')
185 dump_trackrecord (tr_trackrecord)
189 if __name__ ==
'__main__':
192 if len(sys.argv) > 1: