126 def event(self):
127 """
128 give info for both output lists and warnings in the case of mismatches
129 """
132 if oldTracks.getEntries() == newTracks.getEntries():
133 basf2.B2INFO(f"{int(oldTracks.getEntries())} tracks")
134 else:
135 basf2.B2WARNING(f"old version: {int(oldTracks.getEntries())}, new version: {int(newTracks.getEntries())}")
136 for i in range(max(oldTracks.getEntries(), newTracks.getEntries())):
137 if i < oldTracks.getEntries():
138 ptfactor = 0.3 * 1.5 / 100 * 222.376063
139 oldString = f"phi {oldTracks[i].getPhi0() * 180. / np.pi:.3f} pt " + \
140 f"{oldTracks[i].getTransverseMomentum(1.5) / ptfactor:.3f} charge {oldTracks[i].getChargeSign():d} " + \
141 f"chi2 {oldTracks[i].getChi2D():.3f} z {oldTracks[i].getZ0():.3f} cot {oldTracks[i].getCotTheta():.3f} " + \
142 f"chi2 {oldTracks[i].getChi3D():.3f}"
143 else:
144 oldString = "no track"
145 if i < newTracks.getEntries():
146 newString = f"phi {newTracks[i].getPhi0() * 180. / np.pi:.3f} pt {newTracks[i].getTransverseMomentum(1.5):.3f} " + \
147 f"charge {newTracks[i].getChargeSign():d} chi2 {newTracks[i].getChi2D():.3f} z {newTracks[i].getZ0():.3f} " + \
148 f"cot {newTracks[i].getCotTheta():.3f} chi2 {newTracks[i].getChi3D():.3f}"
149 else:
150 newString = "no track"
151 if oldString == newString:
152 basf2.B2INFO(oldString)
153 else:
154 basf2.B2WARNING("old: " + oldString)
155 basf2.B2WARNING("new: " + newString)
156
157
A (simplified) python wrapper for StoreArray.