Fixed crucial bug in MET calculation
@@ -895,10 +895,10 @@ def _get_objects(particles, particles_truth, met_resolution=None, global_event_d
visible_sum.setpxpypze(0.0, 0.0, 0.0, 0.0)
for particle in particles:
- ht += particle.pt
pdgid = abs(particle.pdgid)
if pdgid in [1, 2, 3, 4, 5, 6, 9, 11, 13, 15, 21, 22, 23, 24, 25]:
visible_sum += particle
+ ht += particle.pt
# Soft noise
if met_resolution is not None:
@@ -911,7 +911,7 @@ def _get_objects(particles, particles_truth, met_resolution=None, global_event_d
# MET
met_x = -visible_sum.px + noise_x
- met_y = -visible_sum.px + noise_y
+ met_y = -visible_sum.py + noise_y
met = MadMinerParticle()
met.setpxpypze(met_x, met_y, 0.0, (met_x ** 2 + met_y ** 2) ** 0.5)
