Skip to content

Commit

Permalink
Merge pull request #4 from sindhu-ku/main
Browse files Browse the repository at this point in the history
remove repetitive conversion of ts_start units
  • Loading branch information
sindhu-ku authored Apr 2, 2024
2 parents 00e9498 + 19b879b commit bd7f043
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/flow2supera/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def ReadFile(self, input_files, verbose=False):
events = flow_manager[events_path]
events_data = events['data']
self._event_ids = events_data['id']
self._event_t0s = events_data['unix_ts'] + events_data['ts_start']/1e7
self._event_t0s = events_data['unix_ts'] + events_data['ts_start']/1e7 #ts_start is in ticks and 0.1 microseconds per tick for charge readout
self._event_hit_indices = flow_manager[event_hit_indices_path]
self._hits = flow_manager[calib_prompt_hits_path]
self._backtracked_hits = flow_manager[backtracked_hits_path]
Expand Down Expand Up @@ -202,7 +202,7 @@ def GetEvent(self, event_index):
result.event_id = self._event_ids[event_index]


result.t0 = self._event_t0s[result.event_id]*1e-7 #ts_start is in ticks and 0.1 microseconds per tick for charge readout
result.t0 = self._event_t0s[result.event_id]

result.hit_indices = self._event_hit_indices[result.event_id]
hit_start_index = self._event_hit_indices[result.event_id][0]
Expand Down

0 comments on commit bd7f043

Please sign in to comment.