2 @file slic_to_recon_job.py
4 Simulation of signals in detector (using SLIC) and readout.
5 The simulation is followed by reconstruction of the events.
8 from hpsmc.tools import SLIC, JobManager, ExtractEventsWithHitAtHodoEcal
11 inputs = list(job.input_files.values())
13 job.description =
'slic to recon'
16 if 'event_interval' in job.params:
17 event_int = job.params[
'event_interval']
21 if 'nevents' in job.params:
22 nevents = job.params[
'nevents']
26 if 'base_name' in job.params:
27 base_name = job.params[
'base_name']
33 for i
in range(len(inputs)):
34 filename, file_extension = os.path.splitext(inputs[i])
35 slic_file = filename +
'.slcio'
36 slic_file_names.append(slic_file)
40 for i
in range(len(inputs)):
41 slic_comps.append(
SLIC(inputs=[inputs[i]],
42 outputs=[slic_file_names[i]],
43 nevents=nevents * event_int,
44 ignore_job_params=[
'nevents'])
48 cat_out_name = base_name +
'_slic_cat.slcio'
50 outputs=[cat_out_name],
51 event_interval=0, num_hodo_hits=0)
54 readout_out_name = base_name +
'_readout.slcio'
56 inputs=slic_cat.output_files(),
57 outputs=[readout_out_name])
60 recon_out_name = base_name +
'_recon.slcio'
62 inputs=readout.output_files(),
63 outputs=[recon_out_name])
67 comps.extend([slic_cat, readout, recon])