2 @file tritrig_beam_job.py
4 Merge tritrig and beam events.
6 from hpsmc.tools import LCIOMerge, ExtractEventsWithHitAtHodoEcal
9 inputs = list(job.input_files.values())
11 job.description =
'tritrig beam'
13 if 'event_interval' in job.params:
14 event_interval = job.params[
'event_interval']
19 tritrig_file_name =
'tritrig_events.slcio'
23 for i
in range(len(inputs)):
24 if inputs[i] != tritrig_file_name:
25 beam_file_names.append(inputs[i])
28 tritrig_name =
'tritrig'
31 tritrig_beam_name =
'tritrig_beam'
35 outputs=[
'%s_filt.slcio' % tritrig_name],
36 event_interval=event_interval, num_hodo_hits=0)
40 outputs=[
'beam_cat.slcio'],
41 ignore_job_params=[
'event_interval'],
42 event_interval=0, num_hodo_hits=0)
45 merge =
LCIOMerge(inputs=[filter_bunches.output_files()[0],
46 slic_beam_cat.outputs[0]],
47 outputs=[
'%s.slcio' % tritrig_beam_name],
48 ignore_job_params=[
'nevents'])
50 comps = [filter_bunches, slic_beam_cat, merge]