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