HPS-MC
 
Loading...
Searching...
No Matches
wab_gen_sample_job.py
Go to the documentation of this file.
1"""!
2@file wab_gen_sample_job.py
3
4Python script for generating sampled WAB events in StdHep format from an input LHE file.
5
6The output events can be used as input to 'merge_job.py' with a beam StdHep file to for creating a
7wab-beam sample file.
8"""
9
10from hpsmc.generators import MG4
11from hpsmc.tools import BeamCoords, MergePoisson
12from hpsmc.generators import StdHepConverter
13
14job.description = 'WAB gen and sampling'
15
16
17mg = MG4(name="wab")
18
19# check that at least 80% of the requested events were generated or fail the job
20# check = LHECount(minevents=params.nevents*0.8, inputs=["wab_unweighted_events.lhe.gz"])
21
22
23cnv = StdHepConverter(inputs=mg.output_files(), outputs=['wab_events.stdhep'])
24
25
27
28
29sample = MergePoisson(input_filter='wab',
30 input_files=['wab_unweighted_events_rot.stdhep'],
31 output_files=['wab_unweighted_events_rot_sampled.stdhep'],
32 xsec=7.55e10)
33
34
35job.add([mg, cnv, rot, sample])
Run the MadGraph 4 event generator.
Target processing and conversion of LHE files to StdHep using EGS5.
Transform StdHep events into beam coordinates.
Definition tools.py:516
Merge StdHep files, applying poisson sampling.
Definition tools.py:769
Tools that can be used in HPSMC jobs.
Definition tools.py:1