HPS-MC
 
Loading...
Searching...
No Matches
readout_recon_job.py
Go to the documentation of this file.
1"""!
2@file readout_recon_job.py
3
4Simulate pile-up, run readout, hps-java recon, and analysis.
5"""
6import os
7import logging
8from hpsmc.tools import JobManager, FilterBunches, LCIOCount, HPSTR
9
10
11logger = logging.getLogger('hpsmc.job')
12
13job.description = 'Simulate pile-up, run readout, hps-java recon, and analysis'
14
15if 'filter_bunches' in job.params:
16 filter_bunches = job.params['filter_bunches']
17else:
18 filter_bunches = False
19
20
21input_files = list(job.input_files.values())
22if len(input_files) > 1:
23 raise Exception('This script accepts only one input file.')
24output_base = os.path.splitext(os.path.basename(input_files[0]))[0]
25job.ptag('filt', '%s_filt.slcio' % output_base)
26job.ptag('readout', '%s_filt_readout.slcio' % output_base)
27job.ptag('lcio_recon', '%s_filt_readout_recon.slcio' % output_base)
28job.ptag('hpstr_recon', '%s_filt_readout_recon.root' % output_base)
29job.ptag('hpstr_ana', '%s_filt_readout_recon_ana.root' % output_base)
30
31
32if filter_bunches:
33 filtered = FilterBunches()
34 job.add([filtered])
35
36
37readout = JobManager(steering='readout')
38
39count_readout = LCIOCount()
40
41
42reco = JobManager(steering='recon')
43
44count_reco = LCIOCount()
45
46
47cnv = HPSTR(cfg='recon')
48
49
50ana = HPSTR(cfg='ana')
51
52job.add([readout, count_readout, reco, count_reco, cnv])
53# , 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
Count events in LCIO files.
Definition tools.py:1487
Tools that can be used in HPSMC jobs.
Definition tools.py:1