HPS-MC
slic_gps_to_ana_job.py
Go to the documentation of this file.
1 """!
2 @file slic_gps_to_ana_job.py
3 
4 Run slic to analysis using gps macro.
5 """
6 import os
7 from hpsmc.tools import SLIC, JobManager, FilterBunches, HPSTR
8 
9 job.description = 'Run slic with preexisting tritrig stdhep files'
10 
11 
12 base_name = "gps"
13 input_filename = '{}.stdhep'.format(base_name)
14 sim = SLIC(inputs=[input_filename])
15 
16 
17 filter_bunches = FilterBunches()
18 
19 
20 readout = JobManager(steering='readout', ignore_job_params=['nevents'])
21 
22 
23 recon = JobManager(steering='recon', ignore_job_params=['nevents'])
24 
25 
26 root_cnv = HPSTR(cfg='recon')
27 
28 
29 ana = HPSTR(cfg='ana')
30 
31 
32 job.ptag('sim', '{}.slcio'.format(base_name))
33 job.ptag('readout', '{}_filt_readout.slcio'.format(base_name))
34 job.ptag('recon', '{}_filt_readout_recon.slcio'.format(base_name))
35 job.ptag('recon_root', '{}_filt_readout_recon.root'.format(base_name))
36 job.ptag('ana', '{}_filt_readout_recon_ana.root'.format(base_name))
37 
38 
39 job.add([sim, filter_bunches, readout, recon, root_cnv, ana])
Space MC events and apply energy filters to process before readout.
Definition: tools.py:1048
Run the hpstr analysis tool.
Definition: tools.py:344
Run the hps-java JobManager class.
Definition: tools.py:160
Run the SLIC Geant4 simulation.
Definition: tools.py:15
Tools that can be used in HPSMC jobs.
Definition: tools.py:1