Simple module to collect some information about MCParticles
Definition at line 40 of file ParticleGunPlots.py.
◆ event()
Fill the histograms with the values of the MCParticle collection
Definition at line 43 of file ParticleGunPlots.py.
44 """Fill the histograms with the values of the MCParticle collection"""
46 h_nTracks.Fill(mcParticles.getEntries())
47 for mc
in mcParticles:
49 h_momentum.Fill(p.Mag())
51 h_phi.Fill(p.Phi() / math.pi * 180)
52 h_theta.Fill(p.Theta() / math.pi * 180)
53 h_costheta.Fill(math.cos(p.Theta()))
54 h_pdg.Fill(mc.getPDG())
55 h_xyvertex.Fill(mc.getProductionVertex().X() * 1e4,
56 mc.getProductionVertex().Y() * 1e4)
57 h_zxvertex.Fill(mc.getProductionVertex().Z() * 1e4,
58 mc.getProductionVertex().X() * 1e4)
59 h_zyvertex.Fill(mc.getProductionVertex().Z() * 1e4,
60 mc.getProductionVertex().Y() * 1e4)
A (simplified) python wrapper for StoreArray.
The documentation for this class was generated from the following file: