HPS-MC
rad_gen_job.py
Go to the documentation of this file.
1 """!
2 @file rad_gen_job.py
3 
4 Simulation of radiative events.
5 """
6 from hpsmc.generators import MG5, StdHepConverter
7 from hpsmc.tools import Unzip, BeamCoords, AddMotherFullTruth
8 
9 job.description = 'rad generation'
10 
11 
12 inputs = list(job.input_files.values())
13 
14 if 'nevents' in job.params:
15  nevents = job.params['nevents']
16 else:
17  nevents = 10000
18 
19 
20 mg = MG5(name='RAD', event_types=['unweighted'])
21 
22 
23 cnv = StdHepConverter(name="lhe_rad", inputs=mg.output_files())
24 
25 
26 unzip = Unzip(inputs=mg.output_files(), outputs=["rad.lhe"])
27 
28 
29 mom = AddMotherFullTruth(inputs=[cnv.output_files()[0], unzip.output_files()[0]], outputs=["rad_mom.stdhep"])
30 
31 
32 rot = BeamCoords(inputs=mom.output_files(), outputs=["rad_rot.stdhep"])
33 
34 
35 job.add([mg, cnv, unzip, mom, rot])
Run the MadGraph 5 event generator.
Definition: generators.py:399
Convert LHE files to StdHep using EGS5.
Definition: generators.py:135
Add full truth mother particles for physics samples.
Definition: tools.py:742
Transform StdHep events into beam coordinates.
Definition: tools.py:516
Unzip the input files to outputs.
Definition: tools.py:1218
Tools that can be used in HPSMC jobs.
Definition: tools.py:1