HPS-MC
fee_gen_to_recon_job.py
Go to the documentation of this file.
1 """!
2 Simulation of beam, beam signals in detector (using SLIC), and readout.
3 The simulation is followed by reconstruction of the events.
4 """
5 from hpsmc.generators import EGS5
6 from hpsmc.tools import BeamCoords, RandomSample, SLIC, ExtractEventsWithHitAtHodoEcal, JobManager
7 
8 job.description = 'beam from generation to slic'
9 
10 
11 inputs = list(job.input_files.values())
12 
13 if 'nevents' in job.params:
14  nevents = job.params['nevents']
15 else:
16  nevents = 250000
17 
18 
19 egs5 = EGS5(name="beam_v7_%s" % job.params['run_params'])
20 
21 
22 rot = BeamCoords()
23 
24 
25 sample = RandomSample()
26 
27 
28 slic = SLIC(nevents=nevents + 1)
29 
30 
31 space_events = ExtractEventsWithHitAtHodoEcal(event_interval=250, num_hodo_hits=0)
32 
33 
34 readout = JobManager(steering='readout')
35 
36 
37 recon = JobManager(steering='recon')
38 
39 
40 job.add([egs5, rot, sample, slic, space_events, readout, recon])
Run the EGS5 event generator to produce a StdHep file.
Definition: generators.py:28
Transform StdHep events into beam coordinates.
Definition: tools.py:516
Apply hodo-hit filter and space MC events to process before readout.
Definition: tools.py:1160
Run the hps-java JobManager class.
Definition: tools.py:160
Randomly sample StdHep events into a new file.
Definition: tools.py:589
Run the SLIC Geant4 simulation.
Definition: tools.py:15
Tools that can be used in HPSMC jobs.
Definition: tools.py:1