Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
Included antineutrons in Ekin cut. Fixed bug with cutting on Ekin bef…
Browse files Browse the repository at this point in the history
…ore reading the MARS values
  • Loading branch information
Nazar Bartosik committed Oct 9, 2020
1 parent 24f1b89 commit fa9c4bc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions utils/mars_to_slcio.py
Expand Up @@ -102,17 +102,17 @@
elif not args.invert_pdgs and pdg not in args.pdgs:
continue

# Skipping if it's a neutron with too low kinetic energy
if args.ne_min is not None and pdg == 2112 and sqrt(px*px + py*py + pz*pz) < args.ne_min:
continue

# Converting the rest of string values to floats
x,y,z,px,py,pz,toff,w = map(float, ss[2:10])

# Skipping if it's a neutron with too low kinetic energy
if args.ne_min is not None and abs(pdg) == 2112 and sqrt(px*px + py*py + pz*pz) < args.ne_min:
continue

# Converting time: s -> ns
toff *= 1e9

# Skipping if its time is greater than allowed
# Skipping if particle's time is greater than allowed
if args.t_max is not None and toff > args.t_max:
continue

Expand Down

0 comments on commit fa9c4bc

Please sign in to comment.