short test module to demonstrate the readout of the CDC trigger
Definition at line 90 of file trgcdcReadout.py.
◆ event()
print output values of the different stages in the CDC trigger
Definition at line 95 of file trgcdcReadout.py.
97 print output values of the different stages in the CDC trigger
99 print(
"CDC trigger readout")
105 listnames = [
"2D finder",
"2D fitter",
"3D fitter",
"Neurotrigger"]
106 for i, tracks
in enumerate([tracks2Dfinder, tracks2Dfitter,
107 tracks3Dfitter, tracks3Dneuro]):
108 print(listnames[i],
"has", len(tracks),
"tracks.")
110 print(
"phi0[deg] = %.2f" % (track.getPhi0() * 180. / np.pi),
111 "pt[GeV] = %.3f" % track.getTransverseMomentum(1.5),
112 "charge = %d" % track.getChargeSign(),
113 "theta[deg] = %.2f" % (np.arctan2(1., track.getCotTheta()) * 180. / np.pi),
114 "z[cm] = %.2f" % track.getZ0())
117 print(
"phi0[deg] = %.2f" % (particle.getMomentum().Phi() * 180. / np.pi),
118 "pt[GeV] = %.3f" % particle.getMomentum().Pt(),
119 "charge = %d" % particle.getCharge(),
120 "theta[deg] = %.2f" % (particle.getMomentum().Theta() * 180. / np.pi),
121 "z[cm] = %.2f" % particle.getProductionVertex().Z())
124 main.add_module(TestModule())
130 print(basf2.statistics)
The documentation for this class was generated from the following file: