102 def event(self):
103 """
104 print output values of the different stages in the CDC trigger
105 """
106 print("CDC trigger readout")
112 listnames = ["2D finder", "2D fitter", "3D fitter", "Neurotrigger"]
113 for i, tracks in enumerate([tracks2Dfinder, tracks2Dfitter,
114 tracks3Dfitter, tracks3Dneuro]):
115 print(listnames[i], "has", len(tracks), "tracks.")
116 for track in tracks:
117 print(f"phi0[deg] = {track.getPhi0() * 180.0 / np.pi:.2f}",
118 f"pt[GeV] = {track.getTransverseMomentum(1.5):.3f}",
119 f"charge = {int(track.getChargeSign())}",
120 f"theta[deg] = {np.arctan2(1.0, track.getCotTheta()) * 180.0 / np.pi:.2f}",
121 f"z[cm] = {track.getZ0():.2f}")
124 print(f"phi0[deg] = {particle.getMomentum().Phi() * 180.0 / np.pi:.2f}",
125 f"pt[GeV] = {particle.getMomentum().Pt():.3f}",
126 f"charge = {int(particle.getCharge())}",
127 f"theta[deg] = {particle.getMomentum().Theta() * 180.0 / np.pi:.2f}",
128 f"z[cm] = {particle.getProductionVertex().Z():.2f}")
129
130
A (simplified) python wrapper for StoreArray.
a (simplified) python wrapper for StoreObjPtr.