HPS-MC
 
All Classes Namespaces Files Functions Variables Pages
Loading...
Searching...
No Matches
beam_prep_and_slic_job.py
Go to the documentation of this file.
1"""!
2@file beam_prep_and_slic_job.py
3
4Transform events to beam coodinates, randomly sample them and simulating detector response using slic.
5"""
6from hpsmc.tools import BeamCoords, RandomSample, SLIC
7
8if 'nevents' in job.params:
9 nevents = job.params['nevents']
10else:
11 nevents = 10000
12
13if 'event_interval' in job.params:
14 event_interval = job.params['event_interval']
15else:
16 event_interval = 1
17
18
19inputs = list(job.input_files.values())
20
21
23
24
25sample = RandomSample()
26
27
28slic = SLIC(nevents=nevents * event_interval, ignore_job_params=['nevents'])
29
30
31job.add([rot, sample, slic])
Transform StdHep events into beam coordinates.
Definition tools.py:573
Randomly sample StdHep events into a new file.
Definition tools.py:646
Run the SLIC Geant4 simulation.
Definition tools.py:15
Tools that can be used in HPSMC jobs.
Definition tools.py:1