Simple module to collect some information about MCParticles
Definition at line 32 of file ParticleGunPlots.py.
◆ event()
Fill the histograms with the values of the MCParticle collection
Definition at line 35 of file ParticleGunPlots.py.
36 """Fill the histograms with the values of the MCParticle collection"""
38 h_nTracks.Fill(mcParticles.getEntries())
39 for mc
in mcParticles:
41 h_momentum.Fill(p.Mag())
43 h_phi.Fill(p.Phi() / math.pi * 180)
44 h_theta.Fill(p.Theta() / math.pi * 180)
45 h_costheta.Fill(math.cos(p.Theta()))
46 h_pdg.Fill(mc.getPDG())
47 h_xyvertex.Fill(mc.getProductionVertex().X() * 1e4,
48 mc.getProductionVertex().Y() * 1e4)
49 h_zxvertex.Fill(mc.getProductionVertex().Z() * 1e4,
50 mc.getProductionVertex().X() * 1e4)
51 h_zyvertex.Fill(mc.getProductionVertex().Z() * 1e4,
52 mc.getProductionVertex().Y() * 1e4)
The documentation for this class was generated from the following file: