2 @file signal_beam_merge_to_recon_job.py
4 Merging of signal and beam events, simulation of readout,
5 and reconstruction of events.
7 from hpsmc.tools import ExtractEventsWithHitAtHodoEcal, JobManager, LCIOCount, LCIOMerge
9 job.description =
'signal-beam from merge to recon'
12 inputs = list(job.input_files.values())
22 signal_file_name.append(input)
24 beam_file_name.append(input)
27 if len(signal_file_name) == 0:
28 raise Exception(
"Missing required input file(s) for signal")
29 if len(beam_file_name) == 0:
30 raise Exception(
"Missing required input file(s) for beam")
33 signal_name =
'signal'
39 signal_beam_name =
'signal-beam'
43 outputs=[
'%s_filt.slcio' % signal_name],
44 event_interval=250, num_hodo_hits=1)
47 count_filter =
LCIOCount(inputs=filter_events.output_files())
51 outputs=[
'%s_filt.slcio' % beam_name],
52 event_interval=0, num_hodo_hits=0)
55 count_beam =
LCIOCount(inputs=catenate_beam.output_files())
58 merge =
LCIOMerge(inputs=[filter_events.output_files()[0],
59 catenate_beam.output_files()[0]],
60 outputs=[
'%s.slcio' % signal_beam_name],
61 ignore_job_params=[
'nevents'])
64 count_merge =
LCIOCount(inputs=merge.output_files())
68 inputs=merge.output_files(),
69 outputs=[
'%s_readout.slcio' % signal_beam_name])
72 count_readout =
LCIOCount(inputs=readout.output_files())
76 inputs=readout.output_files(),
77 outputs=[
'%s_recon.slcio' % signal_beam_name])
80 count_recon =
LCIOCount(inputs=recon.output_files())
83 job.add([filter_events, count_filter, catenate_beam, count_beam, merge,
84 count_merge, readout, count_readout, recon, count_recon])