Skip to content

Commit

Permalink
Merge pull request #88 from DUNE/feature/ehinkle_iogroup_tileid_to_hi…
Browse files Browse the repository at this point in the history
…ts_datasets

Add io_group and io_channel to calib_prompt_hits and calib_final_hits datasets
  • Loading branch information
YifanC authored Dec 15, 2023
2 parents 76b410e + ea5f974 commit 3a03882
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/proto_nd_flow/reco/charge/calib_prompt_hits.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class CalibHitBuilder(H5FlowStage):
z f8, pixel z location [cm]
t_drift u8, drift time [ticks???]
ts_pps f8, PPS packet timestamp [ns]
io_group u8, io group ID (PACMAN number)
io_channel u8, io channel ID (related to PACMAN number & PACMAN UART Number)
Q f8, hit charge [ke-]
E f8, hit energy [MeV]
Expand All @@ -81,6 +83,8 @@ class CalibHitBuilder(H5FlowStage):
('z', 'f8'),
('t_drift', 'f8'),
('ts_pps', 'u8'),
('io_group', 'u8'),
('io_channel', 'u8'),
('Q', 'f8'),
('E', 'f8')
])
Expand Down Expand Up @@ -213,6 +217,8 @@ def run(self, source_name, source_slice, cache):
calib_hits_arr['z'] = xy[:,0]/10.
calib_hits_arr['ts_pps'] = raw_hits_arr['ts_pps']
calib_hits_arr['t_drift'] = drift_t
calib_hits_arr['io_group'] = packets_arr['io_group']
calib_hits_arr['io_channel'] = packets_arr['io_channel']
calib_hits_arr['Q'] = self.charge_from_dataword(packets_arr['dataword'],vref,vcm,ped)
calib_hits_arr['E'] = self.charge_from_dataword(packets_arr['dataword'],vref,vcm,ped) * 23.6e-3 # hardcoding W_ion and not accounting for finite electron lifetime

Expand Down

0 comments on commit 3a03882

Please sign in to comment.