Skip to content

Commit

Permalink
Calculate in_fiducial flag correctly in LIController
Browse files Browse the repository at this point in the history
  • Loading branch information
nickkamp1 committed Mar 6, 2024
1 parent 384002b commit ebc150f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions python/LIController.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,9 @@ def SaveEvents(self, filename, fill_tables_at_exit=True, hdf5=True, parquet=True

if self.fid_vol is not None:
pos = _math.Vector3D(datasets["vertex"][-1][-1])
geo_pos = self.detector_model.DetPositionToGeoPosition(pos)
dir = _math.Vector3D(datasets["primary_momentum"][-1][-1][1:])
dir.normalize()
geo_dir = self.detector_model.DetDirectionToGeoDirection(dir)
datasets["in_fiducial"][-1].append(self.fid_vol.IsInside(geo_pos.get(),geo_dir.get()))
datasets["in_fiducial"][-1].append(self.fid_vol.IsInside(pos,dir))
else:
datasets["in_fiducial"][-1].append(False)

Expand Down

0 comments on commit ebc150f

Please sign in to comment.