Skip to content
Snippets Groups Projects
Commit c26befb6 authored by Johannes Schumann's avatar Johannes Schumann
Browse files

Set particle mass of unkowns to zero

parent 3f3411c4
No related branches found
No related tags found
No related merge requests found
Pipeline #24952 passed with warnings
......@@ -111,10 +111,10 @@ HE_PARAMS = {
def _get_particle_rest_mass(pdgid):
@np.vectorize
def vfunc(x):
mass = Particle.from_pdgid(x).mass
if mass is None:
try:
return Particle.from_pdgid(x).mass * 1e-3
except:
return 0
return mass / 1e3
pdgids, invmap = np.unique(ak.to_numpy(pdgid), return_inverse=True)
masses = vfunc(pdgids)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment