HPS-MC
slic_job.py
Go to the documentation of this file.
1 """!
2 @file slic_job.py
3 
4 Simulation of signals in detector using SLIC.
5 """
6 import os
7 from hpsmc.tools import SLIC
8 
9 job.description = 'detector sim via slic'
10 
11 
12 inputs = list(job.input_files.values())
13 
14 
15 output_names = []
16 for i in range(len(inputs)):
17  filename, file_extension = os.path.splitext(inputs[i])
18  outname = filename + '.slcio'
19  output_names.append(outname)
20 
21 if 'nevents' in job.params:
22  nevents = job.params['nevents']
23 else:
24  nevents = 250000
25 
26 
27 slic_outs = []
28 for i in range(len(inputs)):
29  slic_outs.append(SLIC(inputs=[inputs[i]], outputs=[output_names[i]], nevents=nevents + 1))
30 
31 
32 job.add(slic_outs)
Run the SLIC Geant4 simulation.
Definition: tools.py:15
Tools that can be used in HPSMC jobs.
Definition: tools.py:1